Skip to content

What should we do about catch_errors for sinks? #38

Description

@oxinabox

SimpleLogger (and thus FileLogger and DateRotatingLogger) set it to false.
ConsoleLogger sets it to true
FormatLogger sets it to true

Originally posted by @fredrikekre in #35 (comment)

@fredrikekre

Did you have any thoughts on this? Probably don't matter much, only captures message construction errors and those should not happen often.

@oxinabox:

Yeah I am not sure. It seemed fine to match ConsoleLogger.
On the onehand it is hard to debug exceptions that are not thrown
On the other hand your logger failing should not take down your process.

Maybe we should solve it compositionally.
Make all sinks set it to false,
then add a LoggingExceptionCatchingLogger that wrapps a logger and does catch_exceptions.

@fredrikekre

Yea that could be useful for also catching errors in handle_message (xref https://julialang.zulipchat.com/#narrow/stream/236331-logging/topic/Logger.20errors/near/222839637)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions