lib/fs/test/updateTest.rb in manageiq-smartstate-0.2.1 vs lib/fs/test/updateTest.rb in manageiq-smartstate-0.2.2

- old
+ new

@@ -1,6 +1,5 @@ -require 'log4r' require 'ostruct' require 'fs/MiqFS/MiqFS' require 'fs/MiqFsUtil' require 'fs/MetakitFS/MetakitFS' @@ -10,23 +9,14 @@ DST_DIR = "copy_dst" REF_DIR = "copy_dst_ref" MK_FILE = "mkfs" MK_FILE_NC = "mkfs_nc" -# -# Formatter to output log messages to the console. -# -$stderr.sync = true -$stdout.sync = true -class ConsoleFormatter < Log4r::Formatter - def format(event) - t = Time.now - "#{t.hour}:#{t.min}:#{t.sec}: " + (event.data.kind_of?(String) ? event.data : event.data.inspect) + "\n" - end -end -$log = Log4r::Logger.new 'toplog' -Log4r::StderrOutputter.new('err_console', :level => Log4r::DEBUG, :formatter => ConsoleFormatter) -$log.add 'err_console' +require 'logger' +STDOUT.sync = true +STDERR.sync = true +$log = Logger.new(STDERR) +$log.level = Logger::DEBUG fromFs = MiqFS.new(LocalFS, nil) toFs = MiqFS.new(LocalFS, nil) cf = MiqFsUtil.new(fromFs, toFs, "collect_files_direct.yaml")