Skip to content

Commit

Permalink
Logging will append not overwrite the log file for textinfo. Some sma…
Browse files Browse the repository at this point in the history
…ll cleanups
  • Loading branch information
ngiger committed Nov 5, 2013
1 parent 1d83c2c commit 077b688
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugin/text_info.rb
Expand Up @@ -558,7 +558,7 @@ def create_sequence_and_package_if_necessary(iksnr, registration = nil)
unless registration
registration = @app.registration(iksnr)
if registration == nil or registration.packages == nil
puts_sync "Could not find a registration for #{iksnr} #{registration.inspect}"
logCheckActivity "Could not find a registration for #{iksnr} #{registration.inspect}"
return
end
end
Expand Down Expand Up @@ -1194,7 +1194,7 @@ def logCheckActivity(msg)
name = LogFile.filename('check_swissmedicno_fi_pi', Time.now)
puts_sync "Opening #{name}"
FileUtils.makedirs(File.dirname(name))
@checkLog = File.open(name, 'w+')
@checkLog = File.open(name, 'a+')
end
@checkLog.puts("#{Time.now}: #{msg}")
@checkLog.flush
Expand Down Expand Up @@ -1327,7 +1327,7 @@ def check_swissmedicno_fi_pi(options = {}, patinfo_must_be_deleted = false)
end

def update_swissmedicno_fi_pi(options = {})
logCheckActivity "update_swissmedicno_fi_pi #{options} \n#{Time.now}"
logCheckActivity "update_swissmedicno_fi_pi #{options}"
threads = []
@iksnrs_to_import =[]
threads << Thread.new do
Expand Down

0 comments on commit 077b688

Please sign in to comment.