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.
11 12 13 14 15 16 17 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 11 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.
9 10 11 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 9 def action_logger @action_logger end |
#dynflow_logger ⇒ Object (readonly)
Returns the value of attribute dynflow_logger.
9 10 11 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 9 def dynflow_logger @dynflow_logger end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
9 10 11 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 9 def logger @logger end |
Instance Method Details
#level ⇒ Object
19 20 21 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 19 def level @logger.level end |
#level=(v) ⇒ Object
23 24 25 |
# File 'lib/dynflow/logger_adapters/simple.rb', line 23 def level=(v) @logger.level = v end |