Sha256: c5da01b241f0476dc91fc9c3ff61fac967bf4c148da33800c3ed80e0fa0a81c3

Contents?: true

Size: 592 Bytes

Versions: 3

Compression:

Stored size: 592 Bytes

Contents

#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


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ontomde-core-2.0.0 lib/ontomde-core/log.rb
ontomde-core-1.0.4 lib/ontomde-core/log.rb
ontomde-core-1.0.6 lib/ontomde-core/log.rb