From 0ce636cb825155ce839c63924630ebaf594eda02 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 5 Nov 2024 14:23:56 +0000 Subject: [PATCH] Add standard log format displaying thread name --- src/zimscraperlib/logging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zimscraperlib/logging.py b/src/zimscraperlib/logging.py index f2f12ce5..c60a3b25 100644 --- a/src/zimscraperlib/logging.py +++ b/src/zimscraperlib/logging.py @@ -13,6 +13,9 @@ from zimscraperlib.constants import NAME DEFAULT_FORMAT = "[%(name)s::%(asctime)s] %(levelname)s:%(message)s" +DEFAULT_FORMAT_WITH_THREADS = ( + "[%(name)s::%(threadName)s::%(asctime)s] %(levelname)s:%(message)s" +) VERBOSE_DEPENDENCIES = ["urllib3", "PIL", "boto3", "botocore", "s3transfer"]