class ElasticLogger::Types
Public Instance Methods
all()
click to toggle source
# File lib/elastic-logger/types.rb, line 3 def all logs end
by_writter(writer)
click to toggle source
# File lib/elastic-logger/types.rb, line 7 def by_writter(writer) logs.select { |_, values| values.fetch("writer") == writer } end
find(name)
click to toggle source
# File lib/elastic-logger/types.rb, line 11 def find(name) logs.fetch(name, default) end
Private Instance Methods
config()
click to toggle source
# File lib/elastic-logger/types.rb, line 21 def config ElasticLogger.configuration end
default()
click to toggle source
# File lib/elastic-logger/types.rb, line 25 def default { "writer" => "ElasticLogger::NullLogger", "level" => "debug" } end
logs()
click to toggle source
# File lib/elastic-logger/types.rb, line 17 def logs @@logs ||= YAML.load_file(config.types_file) end