lib/daengine.rb in daengine-0.2.9 vs lib/daengine.rb in daengine-0.2.10
- old
+ new
@@ -58,11 +58,11 @@
@config
end
def self.execute(config_options)
self.configure(config_options)
- self.set_logger()
+ self.set_logger(config[:logfile_location])
self.log("Daengine: ### Loading application config ###", "info")
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
begin
DigitalAssetProcessor.process_tuple_directory # start the thread daemon
rescue Exception => e
@@ -70,11 +70,11 @@
end
end
def self.execute_taxonomy(config_options)
self.configure(config_options)
- self.set_logger()
+ self.set_logger(config[:taxonomyengine_logfile_location])
self.log("Daengine: ### Loading application config ###", "info")
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
begin
TaxonomyProcessor.process_taxonomy_file
rescue Exception => e
@@ -82,21 +82,20 @@
end
end
def self.execute_content_service(config_options)
self.configure(config_options)
- self.set_logger()
+ self.set_logger(config[:content_service_logfile_location])
self.log("Daengine: ### Loading application config ###", "info")
config_options.each { |key, value| self.log("CONFIG #{key}\t#{value}", "info")}
begin
ContentServiceProcessor.process_orderable
rescue Exception => e
self.log(e.message, "error")
end
end
- def self.set_logger
- logfile = self.config[:logfile_location]
+ def self.set_logger(logfile)
@logger = Logger.new(logfile, 'daily')
end
def self.logger
@logger