Class: Logger

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

Instance Method Summary collapse

Instance Method Details

#debug(message, *args, &block) ⇒ Object

Log a DEBUG message.



29
30
31
# File 'lib/logger_ext.rb', line 29

def debug(message, *args, &block)
  add_structured_entry(DEBUG, message, *args, &block)
end

#error(message, *args, &block) ⇒ Object

Log an ERROR message.



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

def error(message, *args, &block)
  add_structured_entry(ERROR, message, *args, &block)
end

#fatal(message, *args, &block) ⇒ Object

Log a FATAL message.



49
50
51
# File 'lib/logger_ext.rb', line 49

def fatal(message, *args, &block)
  add_structured_entry(FATAL, message, *args, &block)
end

#info(message, *args, &block) ⇒ Object

Log an INFO message.



34
35
36
# File 'lib/logger_ext.rb', line 34

def info(message, *args, &block)
  add_structured_entry(INFO, message, *args, &block)
end

#unknown(message, *args, &block) ⇒ Object

Log an UNKNOWN message.



54
55
56
# File 'lib/logger_ext.rb', line 54

def unknown(message, *args, &block)
  add_structured_entry(UNKNOWN, message, *args, &block)
end

#warn(message, *args, &block) ⇒ Object

Log a WARN message.



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

def warn(message, *args, &block)
  add_structured_entry(WARN, message, *args, &block)
end