Class: Hanami::Logger::Colorizer Private
- Inherits:
-
NullColorizer
- Object
- NullColorizer
- Hanami::Logger::Colorizer
- Defined in:
- lib/hanami/logger/colorizer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Hanami::Logger Default Colorizer
This colorizer takes in parts of the log message and returns them with proper shellcode to colorize when displayed to a tty.
Instance Method Summary collapse
-
#call(app, severity, datetime, _progname) ⇒ ::Hash
private
Colorize the inputs.
-
#initialize(colors: COLORS) ⇒ Colorizer
constructor
private
A new instance of Colorizer.
Constructor Details
#initialize(colors: COLORS) ⇒ Colorizer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Colorizer.
32 33 34 |
# File 'lib/hanami/logger/colorizer.rb', line 32 def initialize(colors: COLORS) @colors = colors end |
Instance Method Details
#call(app, severity, datetime, _progname) ⇒ ::Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Colorize the inputs
45 46 47 48 49 50 51 |
# File 'lib/hanami/logger/colorizer.rb', line 45 def call(app, severity, datetime, _progname) ::Hash[ app: app(app), severity: severity(severity), time: datetime(datetime), ] end |