#log use: # #log.debug("Created logger") #log.info("Program started") #log.warn("Nothing to do!") #log<<"essai" # http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/ require 'logger' class Object @@log = Logger.new(STDOUT) #@@log.level = Logger::DEBUG @@log.level = Logger::INFO #@@log.datetime_format="%H:%M:%S" @@log.datetime_format="" def log @@log end end class Logger::Formatter XMDA_Format="-- %-5s-- %s\n" #overide standard logger method alias :call_base :call def call(severity, time, progname, msg) XMDA_Format % [severity, msg2str(msg)] end end