Class: Lumberjack::Device::Null
- Inherits:
-
Lumberjack::Device
- Object
- Lumberjack::Device
- Lumberjack::Device::Null
- Defined in:
- lib/lumberjack/device/null.rb
Overview
A logging device that discards all output. This device provides a silent logging implementation useful for testing environments, performance benchmarks, or production scenarios where logging needs to be temporarily disabled without changing logger configuration.
The Null device implements the complete Device interface but performs no actual operations, making it both efficient and transparent. It accepts any constructor arguments for compatibility but ignores them all.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Null
constructor
A new instance of Null.
-
#write(entry) ⇒ void
Discard the log entry without performing any operation.
Methods inherited from Lumberjack::Device
#close, #datetime_format, #datetime_format=, #dev, #flush, open_device, #reopen
Constructor Details
#initialize(*args) ⇒ Null
Returns a new instance of Null.
23 24 |
# File 'lib/lumberjack/device/null.rb', line 23 def initialize(*args) end |
Instance Method Details
#write(entry) ⇒ void
This method returns an undefined value.
Discard the log entry without performing any operation.
30 31 |
# File 'lib/lumberjack/device/null.rb', line 30 def write(entry) end |