mirror of
https://github.com/paul-nameless/tg
synced 2025-02-16 10:38:23 +00:00
Create directory for logs if missing (#162)
This commit is contained in:
parent
bb2d9b889f
commit
7a9e31231b
2 changed files with 3 additions and 2 deletions
|
@ -81,8 +81,7 @@ if os.path.isfile(CONFIG_FILE):
|
|||
if param.isupper():
|
||||
globals()[param] = value
|
||||
else:
|
||||
for directory in (LOG_PATH, CONFIG_DIR, FILES_DIR):
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
os.makedirs(CONFIG_DIR, exist_ok=True)
|
||||
|
||||
if not PHONE:
|
||||
print(
|
||||
|
|
|
@ -49,6 +49,8 @@ class LogWriter:
|
|||
|
||||
|
||||
def setup_log() -> None:
|
||||
os.makedirs(config.LOG_PATH, exist_ok=True)
|
||||
|
||||
handlers = []
|
||||
|
||||
for level, filename in (
|
||||
|
|
Loading…
Add table
Reference in a new issue