Class: Datadog::JSONLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/datadog/json_logger.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output = default_output) ⇒ JSONLogger

Returns a new instance of JSONLogger.



12
13
14
15
# File 'lib/datadog/json_logger.rb', line 12

def initialize(output = default_output)
  super
  @default_formatter = ::Datadog::Loggers::JSONFormatter
end

Class Method Details

.configObject



17
18
19
# File 'lib/datadog/json_logger.rb', line 17

def self.config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



21
22
23
# File 'lib/datadog/json_logger.rb', line 21

def self.configure
  yield(config)
end

Instance Method Details

#configObject



25
26
27
# File 'lib/datadog/json_logger.rb', line 25

def config
  self.class.config
end