Object
Yell::Event.new( :info, 'Hello World', { :scope => 'Application' } ) #=> Hello World scope: Application
jruby and rubinius seem to have a different caller
regex to fetch caller attributes
# File lib/yell/event.rb, line 51 def initialize( logger, options, *messages, &block ) @time = Time.now @name = logger.name extract!(options) @messages = messages @messages << block.call unless block.nil? @caller = logger.trace.at?(level) ? caller[caller_index].to_s : '' @file = nil @line = nil @method = nil @pid = nil end
Accessor to filename the log event occured
# File lib/yell/event.rb, line 89 def file @file || (backtrace!; @file) end
Accessor to the hostname
# File lib/yell/event.rb, line 69 def hostname @@hostname end
Accessor to the line the log event occured
# File lib/yell/event.rb, line 94 def line @line || (backtrace!; @line) end
Accessor to the method the log event occured
# File lib/yell/event.rb, line 99 def method @method || (backtrace!; @method) end
Accessor to the PID
# File lib/yell/event.rb, line 79 def pid Process.pid end
Generated with the Darkfish Rdoc Generator 2.