lib/adhearsion/logging.rb in adhearsion-2.3.5 vs lib/adhearsion/logging.rb in adhearsion-2.4.0.beta1
- old
+ new
@@ -5,10 +5,14 @@
module Adhearsion
module Logging
LOG_LEVELS = %w(TRACE DEBUG INFO WARN ERROR FATAL)
+ class ::Logging::Repository
+ def delete( key ) @h.delete(to_key(key)) end
+ end
+
module HasLogger
def logger
::Logging.logger[logger_id]
end
@@ -74,10 +78,10 @@
def start(_appenders = nil, level = :info, formatter = nil)
::Logging.logger.root.appenders = _appenders.nil? ? default_appenders : _appenders
::Logging.logger.root.level = level
- formatter = formatter if formatter
+ self.formatter = formatter if formatter
end
def default_appenders
[::Logging.appenders.stdout(
'stdout',