Class: VidazingLogger::LayoutPattern Private

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

Determins the format for the logger messages

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color_scheme_id:) ⇒ LayoutPattern

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 LayoutPattern

Since:

  • 0.1.0



12
13
14
15
16
17
18
# File 'lib/vidazing_logger/layout_pattern.rb', line 12

def initialize(color_scheme_id:)
  @layout = Logging.layouts.pattern \
    pattern: '[%d] %-5l %c: %m\n',
    # ISO8601 without the 'T'
    date_pattern: '%Y-%m-%d %H:%M:%S',
    color_scheme: color_scheme_id
end

Instance Attribute Details

#layoutObject (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/layout_pattern.rb', line 10

def layout
  @layout
end