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

Logging format #36296

Open
orenbenkiki opened this issue Jun 15, 2020 · 1 comment
Open

Logging format #36296

orenbenkiki opened this issue Jun 15, 2020 · 1 comment
Labels
logging The logging framework

Comments

@orenbenkiki
Copy link

Currently, regardless of the formatting done by the specific logger implementation, log messages from worker are always prefixed with " From worker X: ". Log messages from the main process are not prefixed.

I can see why one would like such a prefix by default. I'd argue that the default prefix should also indicate the thread, and shouldn't be this loud, but that's a separate issue.

But it would be "very nice indeed" if there was a way to disable this default prefix. From a quick examination of the code, the prefix is added at a very low level code and there is no way to disable it.

Ideally the default prefix would be just one part of the general default logger formatting, allowing custom loggers to provide their own format.

For example, I have created my own logger which formats messages to always indicates which process (and thread!) generated the log message, in a more compact form, for uniform post-processing. I find it is also easier on the eyes for manual log browsing.

However I still need to post-process the log files to remove the very loud and redundant " From worker X: " prefix, which is inconvenient to the users.

@tkf tkf added the logging The logging framework label Jun 15, 2020
@tkf
Copy link
Member

tkf commented Jun 15, 2020

An ultimate fix might be to serialize log records and process them locally. Similar discussion in JuliaLogging/TerminalLoggers.jl#22

Meanwhile, you can save logs to different files (with, e.g., pid in its filename) by manually calling with_logger in each remote call.

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

No branches or pull requests

2 participants