# = Logger # # A simple wrapper arround the Ruby logger. Mainly for compatibility # purposes. # # code: # * George Moschovitis # # (c) 2004 Navel, all rights reserved. # $Id: logger.rb 161 2004-11-18 10:51:51Z gmosx $ require "logger" # = Logger # # A simple wrapper arround the Ruby logger. Mainly for compatibility # purposes. # class Logger alias_method :devel, :debug alias_method :fine, :debug def detach end # Used for debuging, remove this in release code. # def d(str) self << "#{str}\n" end # Inspect an object. Used for debugging, remove this in release # code. # def i(obj) self << "Inspect #{obj.inspect()}\n" end private # the default Ruby logger has a hardwired silly format. # we use some Ruby magic to fix it! remove_const "Format" Format = "%5s: %s\n" def format_message(severity, timestamp, msg, progname) Format % [severity, msg] end end