Proxy for the Logger that injects the name of the object it wraps as the ‘progname’ of each log message.
Create a proxy for the given logger that will inject the name of the specified object into the ‘progname’ of each log message.
# File lib/loggability/logger.rb, line 62 def initialize( logger, object ) @logger = logger @progname = make_progname( object ) end
Delegate debug messages
# File lib/loggability/logger.rb, line 79 def debug( msg=nil, &block ) @logger.add( Logger::DEBUG, msg, @progname, &block ) end
Delegate error messages
# File lib/loggability/logger.rb, line 94 def error( msg=nil, &block ) @logger.add( Logger::ERROR, msg, @progname, &block ) end
Delegate fatal messages
# File lib/loggability/logger.rb, line 99 def fatal( msg=nil, &block ) @logger.add( Logger::FATAL, msg, @progname, &block ) end
Delegate info messages
# File lib/loggability/logger.rb, line 84 def info( msg=nil, &block ) @logger.add( Logger::INFO, msg, @progname, &block ) end
Generated with the Darkfish Rdoc Generator 2.