Module: Pal::Log

Instance Method Summary collapse

Instance Method Details

#log_debug(message) ⇒ Object

Parameters:

  • message (String)


8
9
10
# File 'lib/pal/log.rb', line 8

def log_debug(message)
  Pal.logger.debug(message)
end

#log_error(message, exception = nil) ⇒ Object

Parameters:

  • message (String)
  • exception (Exception/Nil) (defaults to: nil)


24
25
26
27
# File 'lib/pal/log.rb', line 24

def log_error(message, exception=nil)
  Pal.logger.error(message)
  Pal.logger.error(exception.backtrace.join("\n")) unless exception.nil?
end

#log_info(message) ⇒ Object

Parameters:

  • message (String)


13
14
15
# File 'lib/pal/log.rb', line 13

def log_info(message)
  Pal.logger.info(message)
end

#log_warn(message) ⇒ Object

Parameters:

  • message (String)


18
19
20
# File 'lib/pal/log.rb', line 18

def log_warn(message)
  Pal.logger.warn(message)
end