Support standard log levels
- Dominant language
- Ruby
- Stars
- 4
- Forks
- 2
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
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](http://ruby-doc.org/stdlib-2.6.2/libdoc/logger/rdoc/Logger.html). e.g.,
```ruby
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:
```ruby
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.
Contributor guide
Assessment
This issue has not been assessed yet.