Sha256: 66742682b3ea24b416d329bfe5fcdb632ec84e5ed489049d33dbf1571c123ff9

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 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

1 entries across 1 versions & 1 rubygems

Version Path
ontomde-core-1.0.2 lib/ontomde-core/log.rb