Sha256: 8d5f868ae25bff7b836eb62b68799a341d4cae8d65752df6dea4c7c865c5b1ec

Contents?: true

Size: 763 Bytes

Versions: 3

Compression:

Stored size: 763 Bytes

Contents

require 'legion/logging/methods'
require 'legion/logging/builder'

module Legion
  module Logging
    class Logger
      attr_accessor :log, :color, :level, :lex, :log_file, :trace_enabled, :extended

      include Legion::Logging::Methods
      include Legion::Logging::Builder

      def initialize(level: 'info', log_file: nil, lex: nil, trace: false, extended: false, trace_size: 4, **opts) # rubocop:disable Metrics/ParameterLists
        output(logfile: log_file)
        log_level(level)
        log_format(lex: lex, extended: extended, **opts)
        @color = opts[:color]
        @color = true if opts[:color].nil? && log_file.nil?
        @trace_enabled = trace
        @trace_size = trace_size
        @extended = extended
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
legion-logging-1.1.2 lib/legion/logging/logger.rb
legion-logging-1.1.1 lib/legion/logging/logger.rb
legion-logging-1.1.0 lib/legion/logging/logger.rb