Module: Hyrax::Ingest::HasLogger

Included in:
BatchRunner, Fetcher::Base, Ingester::ActiveFedoraPropertyAssigner, Ingester::Base, Runner
Defined in:
lib/hyrax/ingest/has_logger.rb

Defined Under Namespace

Classes: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configObject



16
17
18
# File 'lib/hyrax/ingest/has_logger.rb', line 16

def config
  @config ||= Configuration.new
end

Instance Method Details

#loggerObject



6
7
8
# File 'lib/hyrax/ingest/has_logger.rb', line 6

def logger
  @logger ||= Logger.new(HasLogger.config.default_log_to)
end

#logger=(logger) ⇒ Object

Raises:

  • (Hyrax::Ingest::Errors::InvalidLogger)


10
11
12
13
# File 'lib/hyrax/ingest/has_logger.rb', line 10

def logger=(logger)
  raise Hyrax::Ingest::Errors::InvalidLogger unless logger.is_a? Logger
  @logger = logger
end