lib/log_repository_file.rb in RTALogger-0.1.0 vs lib/log_repository_file.rb in RTALogger-0.1.1

- old
+ new

@@ -1,25 +1,24 @@ require 'logger' require_relative 'log_repository' -require_relative 'factory/origin/log_factory_file_logger' -require_relative 'factory/origin/log_factory_log_formatter' +require_relative 'log_factory_file_logger' +require_relative 'log_factory_log_formatter' module RTALogger # show log items on console out put class LogRepositoryFile < LogRepository - def initialize(file_path = 'log.txt', period = 'daily', shift_size = 1048576) + def initialize(file_path = 'log.txt', period = 'daily', shift_size = 1_048_576) super() @file_logger = RTALogger::LogFactory.new_file_logger(file_path, period, shift_size) - @formatter = RTALogger::LogFactory::log_formatter_default + @formatter = RTALogger::LogFactory.log_formatter_default end protected def flush_and_clear semaphore.synchronize do @log_records.each { |log_record| @file_logger.debug(@formatter.format(log_record)) } end super end - end end