Module: FacterStatistax

Defined in:
lib/executors/executor.rb,
lib/logger.rb,
lib/version.rb,
lib/common/multi_logger.rb,
lib/common/output_writer.rb,
lib/executors/test_run_executor.rb

Overview

frozen_tring_literal: true

Defined Under Namespace

Modules: Common, Executors

Constant Summary collapse

VERSION =
'0.0.3'

Class Method Summary collapse

Class Method Details

.loggerObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/logger.rb', line 6

def self.logger
  FileUtils.mkdir_p(LOG_DIR) unless Dir.exist?(LOG_DIR)

  stdout_logger = Logger.new(STDOUT)
  stdout_logger.level = Logger::DEBUG

  @file_logger ||= Logger.new(::File.open(File.join(LOG_DIR, 'statistax.log'), 'a'))
  @file_logger.level = Logger::DEBUG

  @logger = Common::MultiLogger.new(@file_logger, stdout_logger)
end