Class: VidazingLogger::ColorScheme Private
- Inherits:
-
Object
- Object
- VidazingLogger::ColorScheme
- Defined in:
- lib/vidazing_logger/color_scheme.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.
Set logging colors
Instance Attribute Summary collapse
- #name ⇒ Object readonly private
- #scheme ⇒ Object readonly private
Class Method Summary collapse
- .basic ⇒ Object private
- .error ⇒ Object private
- .normal ⇒ Object private
Instance Method Summary collapse
-
#initialize(name:, date_color:) ⇒ ColorScheme
constructor
private
A new instance of ColorScheme.
Constructor Details
#initialize(name:, date_color:) ⇒ ColorScheme
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 ColorScheme.
11 12 13 14 15 16 |
# File 'lib/vidazing_logger/color_scheme.rb', line 11 def initialize(name:, date_color:) @name = name @scheme = ColorScheme.basic.dup @scheme[:date] = date_color end |
Instance Attribute Details
#name ⇒ Object (readonly)
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.
9 10 11 |
# File 'lib/vidazing_logger/color_scheme.rb', line 9 def name @name end |
#scheme ⇒ Object (readonly)
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.
9 10 11 |
# File 'lib/vidazing_logger/color_scheme.rb', line 9 def scheme @scheme end |
Class Method Details
.basic ⇒ Object
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.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/vidazing_logger/color_scheme.rb', line 27 def basic { levels: { info: :green, warn: :yellow, error: :red, fatal: %i[white on_red] }, logger: :cyan, message: :magenta } end |
.error ⇒ Object
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.
23 24 25 |
# File 'lib/vidazing_logger/color_scheme.rb', line 23 def error ColorScheme.new(name: :error, date_color: :red) end |
.normal ⇒ Object
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.
19 20 21 |
# File 'lib/vidazing_logger/color_scheme.rb', line 19 def normal ColorScheme.new(name: :normal, date_color: :blue) end |