Class: Tracelogger::Log

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

Overview

This class wraps Log4r’s Syslog logic.

Usage

mylog = Log.new
mylog.info "Some Message"

Instance Method Summary collapse

Constructor Details

#initializeLog

Returns a new instance of Log.



24
25
26
27
# File 'lib/tracelogger.rb', line 24

def initialize # :nodoc:
  @log = Log4r::Logger.new "main"
  @log.outputters = Log4r::SyslogOutputter.new("tracelogger", :facility => "LOG_DAEMON")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



30
31
32
# File 'lib/tracelogger.rb', line 30

def method_missing(meth, *args, &block) # :nodoc:
  @log.send meth, *args, &block
end