improve logging

adds timestamps, levels to each message.
each time the daemon is started a message is printed too
master
Egg 2023-05-24 18:13:19 +02:00
parent 81d20bf67c
commit 8c95f5a57f
1 changed files with 3 additions and 0 deletions

View File

@ -19,8 +19,11 @@ if __name__ == '__main__':
logger = logging.getLogger()
fh = logging.FileHandler('/var/log/ticketfrei/backend.log')
fh.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s %(levelname)8s: %(message)s')
fh.setFormatter(formatter)
logger.addHandler(fh)
logger.info("Backend Daemon was started...")
bots = []
for ActiveBot in active_bots.__dict__.values():