[ruby-core:71544] [Ruby trunk - Feature #11633] NilLogger class

From: sonots@...
Date: 2015-11-18 08:46:07 UTC
List: ruby-core #71544
Issue #11633 has been updated by Naotoshi Seo.


```
logger = Logger.new(nil)
logger.fatal { 'foo' } # no print
```

Is this not enough?

----------------------------------------
Feature #11633: NilLogger class
https://bugs.ruby-lang.org/issues/11633#change-54920

* Author: Hannes Nevalainen
* Status: Assigned
* Priority: Normal
* Assignee: Naotoshi Seo
----------------------------------------
I'd like to have a NilLogger class in ruby which have the same api as the stdlib Logger object, but where all logging methods is just noop:s.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next