Class: FFXI::Util::LogListener
- Inherits:
-
Object
- Object
- FFXI::Util::LogListener
- Defined in:
- lib/util/log_listener.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ LogListener
constructor
A new instance of LogListener.
- #property_changed(property, old_value, new_value) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ LogListener
Returns a new instance of LogListener.
6 7 8 9 |
# File 'lib/util/log_listener.rb', line 6 def initialize(opts={}) @log = opts[:logger] || Logger.new(STDERR) @log.level = opts[:log_level] || Logger::INFO end |
Instance Method Details
#property_changed(property, old_value, new_value) ⇒ Object
10 11 12 |
# File 'lib/util/log_listener.rb', line 10 def property_changed(property, old_value, new_value) @log.info "#{property} changed from: <#{old_value}> to: <#{new_value}>" end |