Module: VidazingLogger::Appenders::Type Private

Defined in:
lib/vidazing_logger/appenders/logging_gem_adapter.rb

Overview

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

Determines what kind of logging will occur

See Also:

  • Type::ID_STDOUT, Type::ID_STDERR

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

.valid_type?(type:) ⇒ Boolean

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:

  • (Boolean)

Since:

  • 0.1.0



125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/vidazing_logger/appenders/logging_gem_adapter.rb', line 125

def valid_type?(type:)
  is_valid = false

  begin
    is_valid = Logging.appenders.respond_to?(type)
  rescue StandardError
    abort("Logging.appenders.#{type} is not a public_method." \
          'See https://github.com/TwP/logging/')
  end

  is_valid && TYPES.include?(type)
end