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.
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
Loggerclass. e.g.,Could we add support for this to
L2meter? It would be quite useful to avoid having to invent bespoke logging controls such as: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.