Class: Zumobi::NotificationsLogger
- Inherits:
-
Logger
- Object
- Logger
- Zumobi::NotificationsLogger
- Defined in:
- lib/zumobi/notifications_logger.rb
Instance Method Summary collapse
- #format_message(severity, timestamp, progname, msg) ⇒ Object
-
#initialize ⇒ NotificationsLogger
constructor
A new instance of NotificationsLogger.
Constructor Details
#initialize ⇒ NotificationsLogger
Returns a new instance of NotificationsLogger.
5 6 7 8 |
# File 'lib/zumobi/notifications_logger.rb', line 5 def initialize super( "#{Rails.root}/log/notifications_#{Rails.env}.log" ) self.level = Rails.logger.level end |
Instance Method Details
#format_message(severity, timestamp, progname, msg) ⇒ Object
10 11 12 13 |
# File 'lib/zumobi/notifications_logger.rb', line 10 def (severity, , progname, msg) time = I18n.localize(.in_time_zone("Pacific Time (US & Canada)"), :format => :short) "#{time} PST: #{msg}\n" end |