Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some helpers #84

Open
winterland1989 opened this issue Apr 13, 2016 · 8 comments
Open

Add some helpers #84

winterland1989 opened this issue Apr 13, 2016 · 8 comments

Comments

@winterland1989
Copy link
Contributor

I'd like to add following enhancements:

  • generalise ApacheLoggerActions from wai-logger to something like FastLoggerActions with configurable auto-rotate and auto-log-timestamp capabilities, add these to fast-logger.

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!

  • add runFastLoggerLoggingT :: MonadIO m => FastLoggerActions -> LoggingT m a -> m a to monad-logger and re-export FastLoggerActions related functions from fast-logger.

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
Copy link
Contributor Author

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

@kazu-yamamoto
Copy link
Owner

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
Copy link
Owner

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
Copy link
Contributor Author

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

@kazu-yamamoto
Copy link
Owner

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

@winterland1989
Copy link
Contributor Author

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 yesodweb/wai#351, cacher will be auto turned off if user don't read it frequently enough.

@kazu-yamamoto
Copy link
Owner

Yes, you are right.

@winterland1989
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants