Class: Goz::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/goz/logger.rb

Overview

Goz::Logger - Generic logger

Usage

TODO

Author

blair christensen. <[email protected]>

Homepage

github.com/blairc/goz/

Constant Summary collapse

DEFAULT_LOGDEV =

Default log device to use.

$stdout
@@logger =
nil

Class Method Summary collapse

Class Method Details

.debug(sender, message) ⇒ Object

Send debug log message.

Params:

sender

String sender of log message.

message

String message to send to logger.



39
40
41
# File 'lib/goz/logger.rb', line 39

def self.debug(sender, message)
  self.instance.debug "#{sender} - #{message}"
end

.error(sender, message) ⇒ Object

Send error log message.

Params:

sender

String sender of log message.

message

String message to send to logger.



50
51
52
# File 'lib/goz/logger.rb', line 50

def self.error(sender, message)
  self.instance.error "#{sender} - #{message}"
end

.fatal(sender, message) ⇒ Object

Send fatal log message.

Params:

sender

String sender of log message.

message

String message to send to logger.



61
62
63
# File 'lib/goz/logger.rb', line 61

def self.fatal(sender, message)
  self.instance.fatal "#{sender} - #{message}"
end

.info(sender, message) ⇒ Object

Send info log message.

Params:

sender

String sender of log message.

message

String message to send to logger.



72
73
74
# File 'lib/goz/logger.rb', line 72

def self.info(sender, message)
  self.instance.info "#{sender} - #{message}"
end

.warn(sender, message) ⇒ Object

Send warn log message.

Params:

sender

String sender of log message.

message

String message to send to logger.



83
84
85
# File 'lib/goz/logger.rb', line 83

def self.warn(sender, message)
  self.instance.warn "#{sender} - #{message}"
end