From 19933c96ec34abf9259e65588a8d570f8dbe545d Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Mon, 25 Jan 2021 12:34:18 +0100
Subject: [PATCH] when there is error provide logs in smasch.log file

---
 smash/web/importer/importer.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/smash/web/importer/importer.py b/smash/web/importer/importer.py
index 84f68094..9f5f48eb 100644
--- a/smash/web/importer/importer.py
+++ b/smash/web/importer/importer.py
@@ -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)
-- 
GitLab