lib/slf4r/ruby_logger.rb in slf4r-0.4.0 vs lib/slf4r/ruby_logger.rb in slf4r-0.4.1
- old
+ new
@@ -8,11 +8,11 @@
@@datetime_format = "%Y-%m-%d %H:%M:%S "
def self.new_logger_facade(name)
@name = name
@logger = ::Logger.new(@@file)
- @@level = ::Logger::INFO unless self.class_variable_defined?(:@@level)
+ @@level = ::Logger::DEBUG unless self.class_variable_defined?(:@@level)
@logger.level = @@level
@logger.datetime_format = @@datetime_format
@logger
end
@@ -38,10 +38,10 @@
end
private
def log(type, msg)
- @logger.add(type, msg, @name)
+ @logger.add(type, "(#{@name}) " + msg, @name)
end
protected
def _debug(msg)