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

core: Improve log messages consistency #1510

Merged
merged 1 commit into from Nov 15, 2016
Merged

core: Improve log messages consistency #1510

merged 1 commit into from Nov 15, 2016

Conversation

ddeboer
Copy link
Member

@ddeboer ddeboer commented Nov 10, 2016

Description

Fix #1507.

  • Call lager functions directly so parse transform works.
  • Remove usage of lager:log, which bypasses parse transform.
  • Remove all custom message formattings; have one standard in the lager configuration. For error.log and console.log:
    2016-11-15 16:34:07.629 [error] yoursite <0.890.0>@controller_page:is_authorized:68 Call Houston!
    

Checklist

  • no BC breaks

@mention-bot
Copy link

@ddeboer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mworrell, @mmzeeman and @kaos to be potential reviewers.

@ddeboer ddeboer changed the title core: Improve log messages consistency [WIP] core: Improve log messages consistency Nov 10, 2016
@@ -31,7 +31,7 @@
{lager,
[{handlers,
[
{lager_console_backend, info},
{lager_console_backend, [info, {lager_default_formatter, [time, " [", severity, "] ", {site, [site, " "], ""}, {module, [module, ":", line, " "], ""}, message, "\n"]}]},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Logstash conditional formatting.

@ddeboer ddeboer changed the title [WIP] core: Improve log messages consistency core: Improve log messages consistency Nov 10, 2016
@ddeboer ddeboer force-pushed the 1507-simplify-logging branch 4 times, most recently from 927297c to 20f1c43 Compare November 10, 2016 17:48
@ddeboer ddeboer added this to the 0.23 milestone Nov 10, 2016
@ddeboer
Copy link
Member Author

ddeboer commented Nov 14, 2016

@mworrell Please review.

{lager_console_backend, info},
{lager_file_backend, [{file, "priv/log/error.log"}, {level, error}]},
{lager_console_backend, [info, {lager_default_formatter, [time, " [", severity, "] ", {site, [site, " "], ""}, {module, [module, ":", line, " "], ""}, message, "\n"]}]},
{lager_file_backend, [{file, "priv/log/error.log"}, {level, error}, {formatter, lager_default_formatter}]},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo: check how this influences error.log output. We want lager metadata in error|console.log too.

@ddeboer ddeboer mentioned this pull request Nov 15, 2016
5 tasks
* Call lager functions directly so parse transform works.
* Remove usage of lager:log, which bypasses parse transform.
* Remove all custom message formatting: have one standard in the lager configuration.
@ddeboer ddeboer merged commit 749f340 into 0.x Nov 15, 2016
@ddeboer ddeboer deleted the 1507-simplify-logging branch November 15, 2016 17:27
ddeboer added a commit that referenced this pull request Nov 15, 2016
* Call lager functions directly so parse transform works.
* Remove usage of lager:log, which bypasses parse transform.
* Remove all custom message formatting: have one standard in the lager configuration.

(cherry picked from commit cb8ccb1)
ddeboer added a commit that referenced this pull request Nov 15, 2016
* Call lager functions directly so parse transform works.
* Remove usage of lager:log, which bypasses parse transform.
* Remove all custom message formatting: have one standard in the lager configuration.

(cherry picked from commit cb8ccb1)
ddeboer added a commit that referenced this pull request Nov 23, 2016
* Fix lager:error calls throwing a FORMAT ERROR due to invalid number
  of parameters.
* Remove site name from log messages (see also #1510).
mworrell pushed a commit that referenced this pull request Nov 29, 2016
* Fix lager:error calls throwing a FORMAT ERROR due to invalid number
  of parameters.
* Remove site name from log messages (see also #1510).
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

2 participants