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
Merged

Export log formatting #1001

merged 4 commits into from
Jun 4, 2015

Conversation

ygale
Copy link

@ygale 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
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
@snoyberg
Copy link
Member

snoyberg commented Jun 4, 2015

Awesome, thanks!

@ygale ygale deleted the exportLogFormatting branch June 4, 2015 16:36
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

Successfully merging this pull request may close these issues.

None yet

3 participants