lib/daengine/digital_asset_processor.rb in daengine-0.1.3 vs lib/daengine/digital_asset_processor.rb in daengine-0.1.4

- old
+ new

@@ -56,11 +56,11 @@ deploy_files = Dir.entries(path).select { |f| File.file?("#{path}/#{f}") and File.mtime("#{path}/#{f}") > @@last_read_time }.sort_by { |f| File.mtime("#{path}/#{f}") } if deploy_files.empty? - Daengine.log("DigitalAssetProcessor: No digital asset deployment files found to process under #{path}", "warn") + Daengine.log("WARN: DigitalAssetProcessor: No digital asset deployment files found to process under #{path}", "warn") else Daengine.log("DigitalAssetProcessor: Reading digital asset deployment files from #{path}", "info") deploy_files.each do |filename| #parse the file and add metadata content to database. file = File.expand_path(filename, path) @@ -81,21 +81,21 @@ content = "last_read_time: #{@@last_read_time}" File.open(target, "w+") do |f| f.write(content) end rescue Exception => e - Daengine.log("DigitalAssetProcessor: Failed to write to #{target}.", "warn") + Daengine.log("ERROR: DigitalAssetProcessor: Failed to write to #{target}.", "error") end end def self.read_last_process_time time = "" begin target = Daengine.config[:daengine_yml_file] property = YAML.load_file(target) time = property['last_read_time'] rescue Exception => e - Daengine.log("DigitalAssetProcessor: Failed to read from #{target}", "warn") + Daengine.log("ERROR: DigitalAssetProcessor: Failed to read from #{target}", "error") end time end end \ No newline at end of file