lib/empezar/runner.rb in empezar-0.0.2 vs lib/empezar/runner.rb in empezar-0.1.0
- old
+ new
@@ -1,10 +1,10 @@
module Empezar
class Runner
def self.run argument = 'config/main.yaml'
- self.start_logger
self.start_configuration argument
+ self.start_logger
end
def self.start_configuration argument
unless File.exist? argument
raise ConfigurationFileMissingException, "The configuration file is missing from '#{argument}'"
@@ -13,9 +13,13 @@
end
def self.start_logger
Dir.mkdir 'log' unless Dir.exist? 'log'
Empezar::Log.start Logger.new 'log/main.log', 'daily'
+ if Empezar::Configuration.instance.has_key? :verbosity and Empezar::Configuration.instance.verbosity == 'silent'
+ else
+ Empezar::Log.instance.formatter = EchoingFormatter.new Logger::Formatter.new
+ end
end
end
end
class Runner