Skip to content

Only evaluate expressions when there is a sink for the log message #5

@stefandraskovits-aaa

Description

@stefandraskovits-aaa

Creating log messages can be expansive (e.g. network response body mapping to string).
Currently the expressions for messages (on the caller sites) are already generated when calling the log message.

When wrapping the expression in a closure the closure can only be evaluated if there is a sink even consuming the the message.

with @autoclosure this doesn't change the way of interacting with logbook

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