Class: VidazingLogger::ColorScheme Private

Inherits:
Object
  • Object
show all
Defined in:
lib/vidazing_logger/colors/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

Since:

  • 0.1.0

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameObject (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.

Since:

  • 0.1.0



10
11
12
# File 'lib/vidazing_logger/colors/color_scheme.rb', line 10

def name
  @name
end

Class Method Details

.create(name, date_color:) ⇒ 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.

rubocop:disable Metrics/MethodLength, Metrics/LineLength

Since:

  • 0.1.0



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/vidazing_logger/colors/color_scheme.rb', line 12

def self.create(name, date_color:) # rubocop:disable Metrics/MethodLength, Metrics/LineLength
  # Logging holds the color scheme reference
  Logging.color_scheme(
    name,
    levels: {
      info: :green,
      warn: :yellow,
      error: :red,
      fatal: %i[white on_red]
    },
    date: date_color,
    logger: :cyan,
    message: :magenta
  )
end