Class: Archfiend::Logging
- Inherits:
-
Object
- Object
- Archfiend::Logging
- Defined in:
- lib/archfiend/logging.rb,
lib/archfiend/logging/multi_logger.rb,
lib/archfiend/logging/base_formatter.rb,
lib/archfiend/logging/json_formatter.rb,
lib/archfiend/logging/default_formatter.rb
Defined Under Namespace
Classes: BaseFormatter, DefaultFormatter, JSONFormatter, MultiLogger
Constant Summary collapse
- DEFAULT_FORMATTERS =
{ file: 'JSONFormatter', stdout: 'DefaultFormatter' }.freeze
Class Method Summary collapse
-
.create(environment, log_directory, quiet = false) ⇒ MultiLogger
A multiplexer for up to two loggers.
Class Method Details
.create(environment, log_directory, quiet = false) ⇒ MultiLogger
Returns A multiplexer for up to two loggers.
15 16 17 18 19 20 21 |
# File 'lib/archfiend/logging.rb', line 15 def create(environment, log_directory, quiet = false) environment = environment.to_sym loggers = [file_logger(environment, log_directory)] loggers << stdio_logger if environment == :development && !quiet MultiLogger.new(*loggers) end |