Compare commits
2 commits
c70651f076
...
7f3b643139
Author | SHA1 | Date | |
---|---|---|---|
|
7f3b643139 | ||
|
79ce720ea9 |
2 changed files with 4 additions and 2 deletions
|
@ -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"},
|
||||||
]
|
]
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue