-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Make Logger.Formatter an official formatter for Erlang logger #12400
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
Conversation
if handler = Application.get_env(:logger, :default_handler, default_handler) do | ||
config = | ||
handler | ||
|> Keyword.put_new(:filters, remote_gl: {&:logger_filters.remote_gl/2, :stop}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious,
Is this filter here so that the log message isn't both logged in the originating node and the remote GL node?
So, if I understand correctly, with this filter in place, it is only logged in the remote GL node and stopped in the originating node, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just a bit confused with the comment in the documentation
elixir/lib/logger/lib/logger.ex
Lines 239 to 240 in e34495e
# Do not log messages from other nodes | |
filters: [{&:logger_filters.remote_gl/2, :stop}], |
Just to be sure it is precise to say
# Do not log messages from other nodes
or something more like...
# Do not log messages that are going to be logged in a remote node
?
Still WIP, I need to work on the docs and clean up some other APIs.