Sha256: b9b85e7c56b980419ebd126561651a58d05accf16091e9fe13147209faff18d7

Contents?: true

Size: 410 Bytes

Versions: 10

Compression:

Stored size: 410 Bytes

Contents

module Departure
  module LoggerFactory
    # Returns the appropriate logger instance for the given configuration. Use
    # :verbose option to log to the stdout
    #
    # @param verbose [Boolean]
    # @return [#say, #write]
    def self.build(sanitizers: [], verbose: true)
      if verbose
        Departure::Logger.new(sanitizers)
      else
        Departure::NullLogger.new
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
departure-6.7.0 lib/departure/logger_factory.rb
departure-6.6.0 lib/departure/logger_factory.rb
departure-6.5.0 lib/departure/logger_factory.rb
departure-6.4.0 lib/departure/logger_factory.rb
departure-6.3.0 lib/departure/logger_factory.rb
departure-76c9880-6.2.0 lib/departure/logger_factory.rb
departure-6.2.0 lib/departure/logger_factory.rb
departure-6.1.0 lib/departure/logger_factory.rb
departure-6.0.0 lib/departure/logger_factory.rb
departure-5.0.0 lib/departure/logger_factory.rb