Module: Dry::Logger

Extended by:
Global
Defined in:
lib/dry/logger.rb,
lib/dry/logger/clock.rb,
lib/dry/logger/entry.rb,
lib/dry/logger/filter.rb,
lib/dry/logger/global.rb,
lib/dry/logger/version.rb,
lib/dry/logger/constants.rb,
lib/dry/logger/dispatcher.rb,
lib/dry/logger/backends/io.rb,
lib/dry/logger/backends/core.rb,
lib/dry/logger/backends/file.rb,
lib/dry/logger/backends/proxy.rb,
lib/dry/logger/backends/stream.rb,
lib/dry/logger/formatters/json.rb,
lib/dry/logger/formatters/rack.rb,
lib/dry/logger/formatters/colors.rb,
lib/dry/logger/formatters/string.rb,
lib/dry/logger/formatters/template.rb,
lib/dry/logger/formatters/structured.rb

Defined Under Namespace

Modules: Backends, Formatters, Global Classes: Clock, Dispatcher, Entry, Filter

Constant Summary collapse

VERSION =
"1.0.4"
NEW_LINE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

$/
SEPARATOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

" "
TAB =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

SEPARATOR * 2
EMPTY_ARRAY =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

[].freeze
EMPTY_HASH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

{}.freeze
LOG_METHODS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

%i[debug info warn error fatal unknown].freeze
BACKEND_METHODS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

%i[close].freeze
DEBUG =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::DEBUG
INFO =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::INFO
WARN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::WARN
ERROR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::ERROR
FATAL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::FATAL
UNKNOWN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

::Logger::UNKNOWN
LEVEL_RANGE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

(DEBUG..UNKNOWN)
DEFAULT_LEVEL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

INFO
LEVELS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Hash
.new { |levels, key|
  LEVEL_RANGE.include?(key) ? key : levels.fetch(key.to_s.downcase, DEFAULT_LEVEL)
}
.update(
  "debug" => DEBUG,
  "info" => INFO,
  "warn" => WARN,
  "error" => ERROR,
  "fatal" => FATAL,
  "unknown" => UNKNOWN
)
.freeze
DEFAULT_OPTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

{level: DEFAULT_LEVEL, formatter: nil, progname: nil, log_if: nil}.freeze
BACKEND_OPT_KEYS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

DEFAULT_OPTS.keys.freeze
FORMATTER_OPT_KEYS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

%i[filter].freeze

Method Summary

Methods included from Global

formatters, new, register_formatter, register_template, templates