Commit 6b2d6d04 authored by GROUAZEL's avatar GROUAZEL

add logs to wavetools_launcher_stream.py

parent 6d32968e
......@@ -8,8 +8,8 @@ import logging
import sys
import os, socket
from datetime import datetime
import collections
import time
if __name__ == "__main__":
print "start generating Xspec png files"
year = str(datetime.now().year)
......@@ -26,7 +26,13 @@ if __name__ == "__main__":
nberror = 0
logging.basicConfig(level=logging.INFO)
logging.debug('start plot')
cpt = collections.defaultdict(int)
t0 = time.time()
for line in sys.stdin:
cpt['treated_line'] += 1
if cpt['treated_line']%100==0:
elsaped = time.time()-t0
logging.info('elapsd time %1.1f seconds line=%s success=%s errors=%s',elsaped,cpt['treated_line'],nbsuccess,nberror)
logging.debug('line: %s',line)
#Ignore the first line of errors files
if not line.startswith("FileResume:"):
......@@ -51,3 +57,4 @@ if __name__ == "__main__":
nberror += 1
logging.info("{} generated successfully, {} not generated".format(nbsuccess, nberror))
logging.info('all product in error can be find in %s',filesinerror)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment