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

Capture logger output #298

Merged
merged 2 commits into from
May 26, 2021
Merged

Capture logger output #298

merged 2 commits into from
May 26, 2021

Conversation

jonatanklosko
Copy link
Member

Closes #136.

Adds a logger backend to the evaluation node, which backend logs messages to sender's group leader iff it's an instance of Livebook.Evaluator.IOProxy.

This is essentially a stripped down version of Logger.Backends.Console. It reads basic configuration like log level and format from the same configuration, which may be handy when running inside a mix project, but let me know if it doesn't make sense.

Also, is there a good way to test the backend in isolation?

@josevalim
Copy link
Contributor

I discussed adding this to Elixir itself but given Elixir plans to eventually migrate away from Logger.Backend.Console and use Erlang's handler, we would need to contribute this to Erlang handler first and that seems to be less trivial, so 👍 to getting this in. I will review the PR shortly.

@jonatanklosko jonatanklosko merged commit a7e1d8b into main May 26, 2021
@jonatanklosko jonatanklosko deleted the jk-logger branch May 26, 2021 17:54
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.

Logging
2 participants