Compare commits

...

2 commits

Author SHA1 Message Date
Emma Nora Theuer
7f3b643139 Check existance of and create logfile at startup 2025-02-03 23:17:53 +01:00
Emma Nora Theuer
79ce720ea9 Change version 2025-02-03 23:17:28 +01:00
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "wallman" name = "wallman"
version = "1.5.0.1" version = "1.5.1.1"
authors = [ authors = [
{name = "Emma Nora Theuer", email = "wallman@entheuer.de"}, {name = "Emma Nora Theuer", email = "wallman@entheuer.de"},
] ]

View file

@ -1,5 +1,5 @@
from sys import exit from sys import exit
from os import chdir, getenv, system from os import chdir, getenv, system, path
import logging import logging
import tomllib import tomllib
from datetime import datetime, time from datetime import datetime, time
@ -72,6 +72,8 @@ class _ConfigLib:
chdir("/var/log/wallman/") chdir("/var/log/wallman/")
numeric_level: int = getattr(logging, self.config_log_level, logging.INFO) numeric_level: int = getattr(logging, self.config_log_level, logging.INFO)
logger.setLevel(numeric_level) logger.setLevel(numeric_level)
if not path.exists("wallman.log"):
system("touch wallman.log")
logging.basicConfig(filename="wallman.log", encoding="utf-8", level=numeric_level) logging.basicConfig(filename="wallman.log", encoding="utf-8", level=numeric_level)
# TODO: Make this all just work inside the try/except block, there is no need for get() # TODO: Make this all just work inside the try/except block, there is no need for get()