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

Export log formatting #1001

Merged
merged 4 commits into from Jun 4, 2015

Conversation

Projects
None yet
3 participants
@ygale
Copy link

ygale commented Jun 3, 2015

Make the advice in the makeLogger haddock practical:

For logging during app startup, it recommends creating a Logger, using during startup, and then supplying it to makeLogger when creating the Yesod instance. But for that to be practical, you need access to the default implementations of the various logging-related methods of Yesod and/or the formatLogMessage function. Unfortunately, none of those are available before the Yesod instance is actually created, leading to a chicken-and-egg problem.

This PR moves the default implementations of the logging-related methods to separate functions that don't depend on the Yesod instance, and exports all of those plus formatLogMessage from Yesod.Core.

@gregwebs

This comment has been minimized.

Copy link
Member

gregwebs commented Jun 3, 2015

Great!

snoyberg added a commit that referenced this pull request Jun 4, 2015

@snoyberg snoyberg merged commit f2b435f into yesodweb:master Jun 4, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@snoyberg

This comment has been minimized.

Copy link
Member

snoyberg commented Jun 4, 2015

Awesome, thanks!

@ygale ygale deleted the ygale:exportLogFormatting branch Jun 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.