feat: Docker image

This commit is contained in:
Piotr Dec 2025-11-28 23:19:23 +01:00
parent 6455087893
commit 4fcd7bc49d
Signed by: stawros
GPG key ID: 74B18A3F0F1E99C0
3 changed files with 96 additions and 0 deletions

View file

@ -67,6 +67,10 @@ class HandlerFactory:
return handler
def file_handler(prefix: str = ''):
if not file_path:
raise ValueError("File path must be set.")
file_path.parent.mkdir(parents=True, exist_ok=True)
file_path.touch(exist_ok=True)
handler = TimedRotatingFileHandler(file_path, when='midnight', backupCount=30)
handler.setFormatter(ApplicationFormatter(prefix))
handler.setLevel('TRACE')