I'm trying to write a spec test with no info to stdout - not even STDERR.
Is it easily possible to instantiate a Logger with an IOObject that throws away the data passed to it in all circumstances, without monkeypatching the logger?
If so, is this common practice or should I simply use STDERR?
Regards,
You could create a logger for the null device:
logger = Logger.new(IO::NULL)
or set a high logging severity threshold:
logger.level = Logger::ERROR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With