-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Do respect existing loggers #454
Conversation
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.
LGTM
Thanks! So what do we need to do upstream to be able to remove these workarounds eventually? It seems there's actually quite a few pieces to this puzzle:
Backward compat is going to be hard though until Doing all of the above only solves an instance of the general problem though, which is that we might want loggers to ignore certain types of log records by default if they can't process them "sensibly". This feels like a problem of generalizing |
And TerminalLogger should include the message information. |
@ChrisRackauckas Do you mean the tooltip in Juno? |
Yeah, it should be printing things like |
I guess the only cross-platform way to do this, for now, is to put it as a part of the progress bar name. We are tracking the issue at JuliaLogging/ProgressLogging.jl#23 |
We can't use the message type (e.g.,
Well, that's just a part of brainstorming :) I now think doing this with level type is the way to go, provided that we can have something like |
Ah, you're right of course :-/ The early filtering is necessary for high performance (eventually...) but man it's turning out to be a design annoyance. |
Unfortunately not, that's why I opened JuliaLogging/ProgressLogging.jl#23. |
This PR addresses some of the issues raised by @c42f in #450 (comment). It changes the default logger to a TeeLogger such that existing user-defined loggers are respected and the progress logger only handles progress logs. Additionally, instead of checking if Juno is active, it just checks if the current logger can handle logs of log level -1 (which is the case for the
JunoProgressLogger
).Moreover, for now I set ConsoleProgressMonitor as the default logger on Windows and for Jupyter notebooks (see @tkf's comment #450 (comment) and the discussion in JuliaLogging/TerminalLoggers.jl#25).