Class: SignalWire::Logging::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/signalwire/logging.rb

Overview


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Logger

Returns a new instance of Logger.



39
40
41
42
# File 'lib/signalwire/logging.rb', line 39

def initialize(name)
  @name = name
  @output = $stderr
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



37
38
39
# File 'lib/signalwire/logging.rb', line 37

def name
  @name
end

Instance Method Details

#debug(msg) ⇒ Object



44
45
46
# File 'lib/signalwire/logging.rb', line 44

def debug(msg)
  log(:debug, msg)
end

#error(msg) ⇒ Object



56
57
58
# File 'lib/signalwire/logging.rb', line 56

def error(msg)
  log(:error, msg)
end

#info(msg) ⇒ Object



48
49
50
# File 'lib/signalwire/logging.rb', line 48

def info(msg)
  log(:info, msg)
end

#warn(msg) ⇒ Object



52
53
54
# File 'lib/signalwire/logging.rb', line 52

def warn(msg)
  log(:warn, msg)
end