-
Notifications
You must be signed in to change notification settings - Fork 21
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
What should we do about catch_errors
for sinks?
#38
Comments
The current behaviour/meaning of struct SafetyLogger{L <: AbstractLogger} <: AbstractLogger
logger::L
end
function handle_message(logger::SafetyLogger, args...; kwargs...)
try
handle_message(logger.logger, args...; kwargs...)
catch err
try
println(stderr, "failed so print err and backtrace to stderr")
catch err
end
end
end
shouldlog(logger::SafetyLogger, args...) = shouldlog(logger.logger, args...)
min_enabled_level(logger::SafetyLogger) = min_enabled_level(logger.logger)
catch_exceptions(logger::SafetyLogger) = true |
Leaning towards saying it should generally be set to |
SimpleLogger
(and thusFileLogger
andDateRotatingLogger
) set it tofalse
.ConsoleLogger
sets it totrue
FormatLogger
sets it totrue
Originally posted by @fredrikekre in #35 (comment)
@fredrikekre
@oxinabox:
@fredrikekre
The text was updated successfully, but these errors were encountered: