Class: LogStash::Api::Modules::Logging

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/api/modules/logging.rb

Instance Attribute Summary

Attributes inherited from Base

#agent, #factory

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from LogStash::Api::Modules::Base

Instance Method Details

#handle_logging(settings) ⇒ Object

retrieve logging specific parameters from the provided settings

return any unused configurations



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/logstash/api/modules/logging.rb', line 13

def handle_logging(settings)
  Hash[settings.map do |key, level|
    if key.start_with?("logger.")
      _, path = key.split("logger.")
      LogStash::Logging::Logger::configure_logging(level, path)
      nil
    else
      [key, level]
    end
  end]
end