From f87907670dbe5fd74a1dcb927d59fa78ada6b383 Mon Sep 17 00:00:00 2001
From: lukas leufen <l.leufen@fz-juelich.de>
Date: Mon, 23 Mar 2020 10:11:20 +0100
Subject: [PATCH] changed file path and added to gitignore

---
 .gitignore     | 5 +++--
 src/helpers.py | 3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index f7793d5f..222931f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,9 +45,10 @@ Thumbs.db
 /data/
 /plots/
 
-# tmp folder #
-##############
+# tmp and logging folder #
+##########################
 /tmp/
+/logging/
 
 # test related data #
 #####################
diff --git a/src/helpers.py b/src/helpers.py
index 6e9d47d1..cfbaa79d 100644
--- a/src/helpers.py
+++ b/src/helpers.py
@@ -252,8 +252,7 @@ class Logger:
         :return: path of logfile
         """
         if not path:  # set default path
-            path = os.path.dirname(sys.modules["__main__"].__file__)
-            path = os.path.join(path, "logging")
+            path = os.path.join(os.path.dirname(__file__), "..", "logging")
         if not os.path.exists(path):
             os.makedirs(path)
         runtime = time.strftime("%Y-%m-%d_%H-%M-%S", time.localtime())
-- 
GitLab