Permalink
Browse files

fixed setting of log level

  • Loading branch information...
1 parent bf3f26f commit 9224a551bd16d78881d87d4d54a5602b3117f349 @mkristian committed Nov 19, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/slf4r/ruby_logger.rb
View
@@ -4,21 +4,21 @@
module Slf4r
class LoggerFacade4RubyLogger
- @@level = ::Logger::INFO
@@file = STDERR
@@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)
@logger.level = @@level
@logger.datetime_format = @@datetime_format
@logger
end
def self.level=(level)
@@level = level.instance_of?(Fixnum) ? level :
- ::Logger.get_const(level.to_s.upcase)
+ ::Logger.const_get(level.to_s.upcase)
end
def self.datetime_format=(format)

0 comments on commit 9224a55

Please sign in to comment.