Class: Yabeda::Datadog::Logging

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/yabeda/datadog/logging.rb

Overview

Perform loging

Instance Method Summary collapse

Constructor Details

#initializeLogging

Returns a new instance of Logging.



12
13
14
15
16
# File 'lib/yabeda/datadog/logging.rb', line 12

def initialize
  @logger = Logger.new(STDOUT,
                       level: Yabeda::Datadog.config.log_level,
                       progname: "yabeda_datadog",)
end

Instance Method Details

#debug(message) ⇒ Object



26
27
28
# File 'lib/yabeda/datadog/logging.rb', line 26

def debug(message)
  @logger.debug(message)
end

#error(message) ⇒ Object



34
35
36
# File 'lib/yabeda/datadog/logging.rb', line 34

def error(message)
  @logger.error(message)
end

#fatal(message) ⇒ Object



30
31
32
# File 'lib/yabeda/datadog/logging.rb', line 30

def fatal(message)
  @logger.fatal(message)
end

#info(message) ⇒ Object



22
23
24
# File 'lib/yabeda/datadog/logging.rb', line 22

def info(message)
  @logger.info(message)
end

#level=(level) ⇒ Object



38
39
40
# File 'lib/yabeda/datadog/logging.rb', line 38

def level=(level)
  @logger.level = level
end

#warn(message) ⇒ Object



18
19
20
# File 'lib/yabeda/datadog/logging.rb', line 18

def warn(message)
  @logger.warn(message)
end