Class: Dry::Logger::Backends::Stream
- Inherits:
-
Logger
- Object
- Logger
- Dry::Logger::Backends::Stream
- Includes:
- Core
- Defined in:
- lib/dry/logger/backends/stream.rb
Instance Attribute Summary collapse
- #level ⇒ Object readonly private
- #stream ⇒ Object readonly private
Attributes included from Core
Instance Method Summary collapse
-
#initialize(stream:, formatter:, level: DEFAULT_LEVEL, progname: nil, log_if: nil) ⇒ Stream
constructor
private
A new instance of Stream.
- #inspect ⇒ Object
Methods included from Core
Constructor Details
#initialize(stream:, formatter:, level: DEFAULT_LEVEL, progname: nil, log_if: nil) ⇒ Stream
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Stream.
24 25 26 27 28 29 30 31 32 |
# File 'lib/dry/logger/backends/stream.rb', line 24 def initialize(stream:, formatter:, level: DEFAULT_LEVEL, progname: nil, log_if: nil) super(stream, progname: progname) @stream = stream @level = LEVELS[level] self.log_if = log_if self.formatter = formatter end |
Instance Attribute Details
#level ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/dry/logger/backends/stream.rb', line 20 def level @level end |
#stream ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/dry/logger/backends/stream.rb', line 16 def stream @stream end |
Instance Method Details
#inspect ⇒ Object
36 37 38 |
# File 'lib/dry/logger/backends/stream.rb', line 36 def inspect %(#<#{self.class} stream=#{stream} level=#{level} log_if=#{log_if}>) end |