Skip to content

Commit 33358a4

Browse files
author
Chris Sig Dev
committed
SigLog class now adds missing log dir
modified: src/utils.py
1 parent 0d4bd28 commit 33358a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,11 @@ def update(self, new_value):
203203

204204

205205
class SigLog:
206-
file = "logs/signifier.log"
206+
SIG_PATH = os.getenv('SIGNIFIER')
207+
LOG_PATH = os.path.join(SIG_PATH, 'logs')
208+
if not os.path.isdir(LOG_PATH):
209+
os.mkdir(LOG_PATH)
210+
file = os.path.join(LOG_PATH, 'signifier.log')
207211
level = logging.DEBUG
208212
format_dt = '%d-%m-%y %H:%M:%S'
209213
format_msg = '%(asctime)s %(name)18s - %(levelname)10s - %(message)s'

0 commit comments

Comments
 (0)