Module: Lug::Standard::LoggerDeviceMethods

Included in:
Device, Logger
Defined in:
lib/lug/standard.rb

Instance Method Summary collapse

Instance Method Details

#debug(msg = nil) ⇒ Object



85
86
87
88
# File 'lib/lug/standard.rb', line 85

def debug(msg = nil)
  msg ||= yield if block_given?
  log(msg, 0)
end

#error(msg = nil) ⇒ Object



100
101
102
103
# File 'lib/lug/standard.rb', line 100

def error(msg = nil)
  msg ||= yield if block_given?
  log(msg, 3)
end

#fatal(msg = nil) ⇒ Object



105
106
107
108
# File 'lib/lug/standard.rb', line 105

def fatal(msg = nil)
  msg ||= yield if block_given?
  log(msg, 4)
end

#info(msg = nil) ⇒ Object



90
91
92
93
# File 'lib/lug/standard.rb', line 90

def info(msg = nil)
  msg ||= yield if block_given?
  log(msg, 1)
end

#unknown(msg = nil) ⇒ Object



110
111
112
113
# File 'lib/lug/standard.rb', line 110

def unknown(msg = nil)
  msg ||= yield if block_given?
  log(msg, 5)
end

#warn(msg = nil) ⇒ Object



95
96
97
98
# File 'lib/lug/standard.rb', line 95

def warn(msg = nil)
  msg ||= yield if block_given?
  log(msg, 2)
end