mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Ensure audit log exists
This commit is contained in:
parent
2a6c0ca751
commit
b904430069
9
main.py
9
main.py
@ -278,6 +278,15 @@ def setup_logging(debug=True):
|
||||
encoding="utf-8",
|
||||
).close()
|
||||
|
||||
if not helper.check_file_exists(
|
||||
os.path.join(APPLICATION_PATH, "logs", "audit.log")
|
||||
):
|
||||
open(
|
||||
os.path.join(APPLICATION_PATH, "logs", "audit.log"),
|
||||
"a",
|
||||
encoding="utf-8",
|
||||
).close()
|
||||
|
||||
if os.path.exists(logging_config_file):
|
||||
# open our logging config file
|
||||
with open(logging_config_file, "rt", encoding="utf-8") as f:
|
||||
|
Loading…
Reference in New Issue
Block a user