Skip to content

Support passing a function to the logger #1

Description

@frogamic

This would allow lazy evaluation of log output, so that if you need to run an expensive operation to collect stats, that isn't called if the loglevel would not output it anyway.

It should behave like:

const slowFunctionToFetchDebugData = () => {
  // slow stuff
};
logger.debug(slowFunctionToFetchDebugData);

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