Skip to content

When an error occurs in Log message invocation then log it as an ERROR #160

@kemalizing

Description

@kemalizing

Hi,

We are using kotlin-logging on many services on production. Today we figured out that if a message lambda fails, that incident is logged with the initial logging level, while it is actually an error. Which leads to some unexpected behavior.

Basically I'm speaking about this log "Log message invocation failed: $e" coming from toStringSafe method.

Is it possible to log that exception in ERROR level?

Thanks.
Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions