mberlanda/cheidelacoriera

View on GitHub
app/lib/task_logger.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
# frozen_string_literal: true

# :nocov:
module TaskLogger
  extend self

  def init_logger
    @init_logger ||= Logger.new(multi_io_logger)
  end

  def multi_io_logger
    MultiIo.new($stdout, File.open(task_logger_path, 'a'))
  end

  def task_logger_path
    Rails.root.join('log', 'tasks.log')
  end
end
# :nocov: