Module: Rubix::Logs

Included in:
AutoSender, Connection, Model, Model, Sender
Defined in:
lib/rubix/log.rb

Overview

This module can be included by any class to enable logging to the Rubix.logger.

Instance Method Summary collapse

Instance Method Details

#debug(*args) ⇒ Object

Write a log message with severity debug.

Parameters:

  • args (Array<String>)


84
85
86
87
# File 'lib/rubix/log.rb', line 84

def debug *args
  return unless Rubix.logger
  Rubix.logger.log(Logger::DEBUG, args.join(' '))
end

#error(*args) ⇒ Object

Write a log message with severity error.

Parameters:

  • args (Array<String>)


108
109
110
111
# File 'lib/rubix/log.rb', line 108

def error *args
  return unless Rubix.logger
  Rubix.logger.log(Logger::ERROR, args.join(' '))
end

#fatal(*args) ⇒ Object

Write a log message with severity fatal.

Parameters:

  • args (Array<String>)


116
117
118
119
# File 'lib/rubix/log.rb', line 116

def fatal *args
  return unless Rubix.logger
  Rubix.logger.log(Logger::FATAL, args.join(' '))
end

#info(*args) ⇒ Object

Write a log message with severity info.

Parameters:

  • args (Array<String>)


92
93
94
95
# File 'lib/rubix/log.rb', line 92

def info *args
  return unless Rubix.logger
  Rubix.logger.log(Logger::INFO, args.join(' '))
end

#warn(*args) ⇒ Object

Write a log message with severity warn.

Parameters:

  • args (Array<String>)


100
101
102
103
# File 'lib/rubix/log.rb', line 100

def warn *args
  return unless Rubix.logger
  Rubix.logger.log(Logger::WARN, args.join(' '))
end