kazu-yamamoto / logger

A fast logging system for Haskell
159 stars 68 forks source link

Add some helpers #84

Open winterland1989 opened 8 years ago

winterland1989 commented 8 years ago

I'd like to add following enhancements:

Motivation: timestamp logging is absolutely necessary, a lot of librarys doing this in a very inefficient way, for example, logging doing this with a system call and a directly show. The work you have done in wai-logger is awesome!

Motivation: since monad-logger rely on fast-logger, we should provide ways to use it with MonadLogger.

Are these changes look good to you? I'd like send a pr with those enhancement : )

winterland1989 commented 8 years ago

B.T.W, is there any reason not to update date-cache package with auto-update implementation?

kazu-yamamoto commented 8 years ago

Please give us pull request to show your code.

Michael maintains monad-logger while I maintain fast-logger and wai-logger. Please separate your pull requests for each maintainer. If you mix up, the review process gets harder.

kazu-yamamoto commented 8 years ago

B.T.W, is there any reason not to update date-cache package with auto-update implementation?

date-cache is obsoleted. Warp has date cache by itself now.

winterland1989 commented 8 years ago

A side note: should we make a global simpleTimeCacher? My preference is not but I really need some input here.

kazu-yamamoto commented 8 years ago

Does the global time cacher stay always even in the case where date is not necessary?

winterland1989 commented 8 years ago

Does the global time cacher stay always even in the case where date is not necessary?

That depend on how auto-update implement cache, from what i read from https://github.com/yesodweb/wai/issues/351, cacher will be auto turned off if user don't read it frequently enough.

kazu-yamamoto commented 8 years ago

Yes, you are right.

winterland1989 commented 8 years ago

Ok, i will add a global simpleTimeCacher to encourage user share cache between loggers, and refract wai-logger based on this. PR will come soon.