Module: PerconaMigrator::LoggerFactory

Defined in:
lib/percona_migrator/logger_factory.rb

Class Method Summary collapse

Class Method Details

.build(sanitizers: [], verbose: true) ⇒ #say, #write

Returns the appropriate logger instance for the given configuration. Use :verbose option to log to the stdout

Parameters:

  • verbose (Boolean) (defaults to: true)

Returns:

  • (#say, #write)


9
10
11
12
13
14
15
# File 'lib/percona_migrator/logger_factory.rb', line 9

def self.build(sanitizers: [], verbose: true)
  if verbose
    PerconaMigrator::Logger.new(sanitizers)
  else
    PerconaMigrator::NullLogger.new
  end
end