Class: Dynflow::LoggerAdapters::Simple
- Defined in:
- lib/dynflow/logger_adapters/simple.rb
Defined Under Namespace
Classes: ProgNameWrapper
Instance Attribute Summary collapse
-
#action_logger ⇒ Object
readonly
Returns the value of attribute action_logger.
-
#dynflow_logger ⇒ Object
readonly
Returns the value of attribute dynflow_logger.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(output = $stdout, level = Logger::DEBUG, formatters = [Formatters::Exception]) ⇒ Simple
constructor
A new instance of Simple.
- #level ⇒ Object
- #level=(v) ⇒ Object
Constructor Details
#initialize(output = $stdout, level = Logger::DEBUG, formatters = [Formatters::Exception]) ⇒ Simple
Returns a new instance of Simple.
10 11 12 13 14 15 16 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 10 def initialize(output = $stdout, level = Logger::DEBUG, formatters = [Formatters::Exception]) @logger = Logger.new(output) @logger.level = level @logger.formatter = method(:formatter).to_proc @action_logger = apply_formatters ProgNameWrapper.new(@logger, ' action'), formatters @dynflow_logger = apply_formatters ProgNameWrapper.new(@logger, 'dynflow'), formatters end |
Instance Attribute Details
#action_logger ⇒ Object (readonly)
Returns the value of attribute action_logger.
8 9 10 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 8 def action_logger @action_logger end |
#dynflow_logger ⇒ Object (readonly)
Returns the value of attribute dynflow_logger.
8 9 10 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 8 def dynflow_logger @dynflow_logger end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
8 9 10 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 8 def logger @logger end |
Instance Method Details
#level ⇒ Object
18 19 20 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 18 def level @logger.level end |
#level=(v) ⇒ Object
22 23 24 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 22 def level=(v) @logger.level = v end |