Class: Zumobi::NotificationsLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/zumobi/notifications_logger.rb

Instance Method Summary collapse

Constructor Details

#initializeNotificationsLogger

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 format_message(severity, timestamp, progname, msg)
    time = I18n.localize(timestamp.in_time_zone("Pacific Time (US & Canada)"), :format => :short)
    "#{time} PST: #{msg}\n"
end