Skip to content
Snippets Groups Projects
Commit 19933c96 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when there is error provide logs in smasch.log file

parent 7ae0bdca
No related branches found
No related tags found
1 merge request!301Error logging
......@@ -40,11 +40,11 @@ class Importer(EtlCommon):
continue
else:
self.import_study_subject(study_subject)
except BaseException:
except BaseException as e:
self.problematic_count += 1
traceback.print_exc(file=sys.stdout)
logger.error("Problem with importing study subject: " + str(study_subject.screening_number) + "," +
str(study_subject.nd_number))
str(study_subject.nd_number), exc_info=e)
if "WARNING" in warning_counter.level2count:
self.warning_count = warning_counter.level2count["WARNING"]
logging.getLogger('').removeHandler(warning_counter)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment