Skip to content

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

Merged
merged 18 commits into from
Feb 15, 2023

Conversation

josevalim
Copy link
Member

Still WIP, I need to work on the docs and clean up some other APIs.

@josevalim josevalim merged commit afa44f6 into main Feb 15, 2023
@josevalim josevalim deleted the jv-logger-formatter branch February 15, 2023 16:31
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})
Copy link
Contributor

@grzuy grzuy Apr 22, 2025

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?

Copy link
Contributor

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

# 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

?

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

Successfully merging this pull request may close these issues.

2 participants