lib/slogger/common_logger.rb in slogger-0.0.9 vs lib/slogger/common_logger.rb in slogger-0.0.10

- old
+ new

@@ -39,10 +39,13 @@ # # Just a little sugar # FACILITIES = ::Slogger::Base::SYSLOG_FACILITIES + # For Rails/ActiveSupport 4 compatibility + attr_reader :formatter + # # To build a Slogger::CommonLogger instance. # # +app_name+:: The appliaction name to be logged # +severity+:: The log severity (according to standard Ruby Logger): :unknow, :fatal, @@ -54,9 +57,10 @@ # # Raises an ArgumentError if app_name, severity, or facility is nil. # def initialize(app_name, severity, facility) super app_name, BRIDGE_SEVERITIES[severity], facility, SEVERITIES + @formatter = ::Logger::Formatter.new end def log(severity, message = nil, &block) if block_given? and message != nil super(severity, message, &block)