Sha256: 460f0ca56775b3d96c92c312a77b0e5236c150e6abb6adbc2d7f525e67de3707

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

# namespace
module TeeLogger
  # no param of filename, set this filename
  DEFAULT_FILE = './tee_logger.log'.freeze

  # configured attributes
  CONFIGURED_ATTRIBUTES =
    [:level, :progname, :formatter, :datetime_format].freeze

  # implements targets
  LOGGING_METHODS = [:debug, :info, :warn, :error, :fatal].freeze

  # defined logdev names
  LOGDEV_NAMES = [:console, :logfile].freeze

  # defined paired of logdev name
  LOGDEV_REVERSE = { console: :logfile, logfile: :console }.freeze

  # empty format
  FORMATTER_FOR_DISABLING = proc { |_severity, _time, _progname, _msg| '' }

  # using TeeLogger::Utils.extract_options
  # @attr logdev_name [Symbol]
  # @attr indent_level [Fixnum]
  ParsedOption = Struct.new(:logdev_name, :indent_level)

  # LOGDEV_NAMES not included error
  class IncorrectNameError < StandardError; end

  # option's class is not allow
  class IncorrectOptionError < StandardError; end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tee_logger-3.2.4 lib/tee_logger/constants.rb
tee_logger-3.2.3 lib/tee_logger/constants.rb
tee_logger-3.2.2 lib/tee_logger/constants.rb