Class: Wright::Logger
- Inherits:
-
Logger
- Object
- Logger
- Wright::Logger
- Defined in:
- lib/wright/logger.rb
Overview
Default logger for Wright.
Defined Under Namespace
Classes: Formatter
Instance Method Summary collapse
-
#initialize(logdev = $stdout) ⇒ Logger
constructor
Initializes a Logger.
Constructor Details
#initialize(logdev = $stdout) ⇒ Logger
Initializes a Logger.
Enables log colorization if the log device is a TTY and colorization was not disabled before initialization.
58 59 60 61 62 63 64 |
# File 'lib/wright/logger.rb', line 58 def initialize(logdev = $stdout) super Wright::Config[:log] ||= {} return if Wright::Config[:log].key?(:colorize) Wright::Config[:log][:colorize] = logdev.tty? end |