Class: FFXI::Util::LogListener

Inherits:
Object
  • Object
show all
Defined in:
lib/util/log_listener.rb

Instance Method Summary collapse

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