Class: VidazingLogger::Appenders::Type Private

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

Since:

  • 0.1.0

Constant Summary collapse

ID_ROLLING_FILE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

'rolling_file'
ID_STDOUT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

'stdout'
ID_STDERR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

'stderr'
TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

[ID_ROLLING_FILE, ID_STDERR, ID_STDOUT].freeze

Class Method Summary collapse

Class Method Details

.create(type:, id:, args:) ⇒ 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.

Since:

  • 0.1.0



19
20
21
22
23
24
25
26
27
# File 'lib/vidazing_logger/appenders/type.rb', line 19

def create(type:, id:, args:)
  abort('args is empty!') if args.empty?
  abort("Type '#{type}' is not valid.") unless valid_type?(type: type)

  args.unshift(id)

  Logging.appenders.public_send(type, *args)
  Logging.appenders[id]
end