You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to write printed messages to log files as well as the terminal. If we have 1 log file for each process, we can see which process each message actually came from, which could be useful for debugging, etc.
One option could be to use the Logging module (https://docs.julialang.org/en/v1/stdlib/Logging/) and define a 'custom logger' that prints the message both to stdout and to a file (that can be named when the logger is created). We'd replace println(foo) with @info foo (or possibly @warn foo or @debug foo...).
It should also be possible to have messages that are printed to the log files by all processes, but only printed to the terminal by the root (MPI rank-0) process, either as the default setting (the custom Logger could check whether it is on rank-0 or not), or with a custom macro like @info_root which we could copy/modify from @info.
The text was updated successfully, but these errors were encountered:
It would be nice to write printed messages to log files as well as the terminal. If we have 1 log file for each process, we can see which process each message actually came from, which could be useful for debugging, etc.
One option could be to use the
Logging
module (https://docs.julialang.org/en/v1/stdlib/Logging/) and define a 'custom logger' that prints the message both to stdout and to a file (that can be named when the logger is created). We'd replaceprintln(foo)
with@info foo
(or possibly@warn foo
or@debug foo
...).It should also be possible to have messages that are printed to the log files by all processes, but only printed to the terminal by the root (MPI rank-0) process, either as the default setting (the custom Logger could check whether it is on rank-0 or not), or with a custom macro like
@info_root
which we could copy/modify from@info
.The text was updated successfully, but these errors were encountered: