Class: EZDyn::EZDynLog
- Inherits:
-
Object
- Object
- EZDyn::EZDynLog
- Defined in:
- lib/ezdyn/log.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ EZDynLog
constructor
A new instance of EZDynLog.
Constructor Details
#initialize ⇒ EZDynLog
Returns a new instance of EZDynLog.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ezdyn/log.rb', line 14 def initialize @logger = Logger.new(STDERR) @logger.level = Logger::DEBUG @logger.datetime_format = '%Y-%m-%d %H:%M:%S' @logger.formatter = proc do |sev, dt, prog, msg| "#{dt} #{sev}: #{msg}\n" end @logger.debug { "Logger initialized" } end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
12 13 14 |
# File 'lib/ezdyn/log.rb', line 12 def logger @logger end |