Module: Rpush::Daemon::Loggable

Instance Method Summary collapse

Instance Method Details

#log_debug(msg) ⇒ Object



4
5
6
# File 'lib/rpush/daemon/loggable.rb', line 4

def log_debug(msg)
  Rpush.logger.debug(app_prefix(msg))
end

#log_error(e) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/rpush/daemon/loggable.rb', line 16

def log_error(e)
  if e.is_a?(Exception)
    Rpush.logger.error(e)
  else
    Rpush.logger.error(app_prefix(e))
  end
end

#log_info(msg) ⇒ Object



8
9
10
# File 'lib/rpush/daemon/loggable.rb', line 8

def log_info(msg)
  Rpush.logger.info(app_prefix(msg))
end

#log_warn(msg) ⇒ Object



12
13
14
# File 'lib/rpush/daemon/loggable.rb', line 12

def log_warn(msg)
  Rpush.logger.warn(app_prefix(msg))
end