Skip to content

Commit 20c6a8f

Browse files
Removed creation of logs folder from deploy
Now create logs folder when required in createLogger using config.toml
1 parent 5d87927 commit 20c6a8f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

deploy.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
envPath = rootDir / "env"
88
srcPath = rootDir / "src"
99
reqsPath = rootDir / "reqs.txt"
10-
logsPath = rootDir / "logs.txt"
1110

1211
pythonVersion = f"{sys.version_info.major}.{sys.version_info.minor}"
1312

@@ -37,9 +36,6 @@
3736
else:
3837
print("ERROR: No site-packages path found")
3938
exit()
40-
41-
print("Creating Logs folder")
42-
logsPath.mkdir(parents=True, exist_ok=True)
4339

4440
print("-" * 40)
4541
print("Virtual environment has been set up!\n")

src/lib/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def createLogger() -> logging.Logger:
2626
formatter = logging.Formatter("[%(asctime)s] %(levelname)s: %(message)s", "%H:%M:%S")
2727

2828
logFolder: Path = gcfg.folders.logs
29+
logFolder.mkdir(parents=True, exist_ok=True)
30+
2931
logFileName = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
3032
logFilePath = logFolder / f"{logFileName}.log"
3133

0 commit comments

Comments
 (0)