Added logger and replaced print statements

This commit is contained in:
2024-01-13 01:55:24 +01:00
parent e6cfbc6783
commit e1489deef8
3 changed files with 35 additions and 17 deletions

14
logger.py Normal file
View File

@@ -0,0 +1,14 @@
import logging
import sys
stdout_handler = logging.StreamHandler(stream=sys.stdout)
handlers = [stdout_handler]
logging.basicConfig(
level=logging.DEBUG,
format='[%(asctime)s] %(levelname)s\t %(message)s',
handlers=handlers
)
logger = logging.getLogger('cloudflare-ddns')