Skip to content

Support standard log levels #5

@stevenharman

Description

@stevenharman

It's common amongst log tooling to support various log levels such that you can declaratively say "log the following message, when the level is of appropriate level." This is built into Ruby standard library in the form of the Logger class. e.g.,

logger.level = Logger::WARN

logger.debug("Created logger") #=>
logger.info("Program started") #=>
logger.warn("Nothing to do!")  #=> Nothing to do!

Could we add support for this to L2meter? It would be quite useful to avoid having to invent bespoke logging controls such as:

l2meterlog.log("started", app: 42) if config.verbose_logging?

I could take a shot at a PR to add this, but wanted to see if there was an interest in it first. Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions