Logs via logging library
This commit is contained in:
@@ -207,7 +207,13 @@ def pretty_print(result: Dict[str, Any]):
|
|||||||
logging.info(pformat(result))
|
logging.info(pformat(result))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
logging.basicConfig(level=LOG_LEVEL)
|
logging.basicConfig(
|
||||||
|
level=LOG_LEVEL,
|
||||||
|
filename=LOG_FILE,
|
||||||
|
format="{asctime} - {levelname} - {message}",
|
||||||
|
style = "{",
|
||||||
|
datefmt = "%Y-%m-%d %H:%M:%S",
|
||||||
|
)
|
||||||
|
|
||||||
logging.info(f"Starting updater for {FULL_DOMAIN} (zone {ZONE}) backend={BACKEND}")
|
logging.info(f"Starting updater for {FULL_DOMAIN} (zone {ZONE}) backend={BACKEND}")
|
||||||
if BACKEND not in ("HTTP_API", "RFC2136"):
|
if BACKEND not in ("HTTP_API", "RFC2136"):
|
||||||
|
Reference in New Issue
Block a user