Skip to content

Commit 0ce636c

Browse files
committed
Add standard log format displaying thread name
1 parent fd5c04a commit 0ce636c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/zimscraperlib/logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
from zimscraperlib.constants import NAME
1414

1515
DEFAULT_FORMAT = "[%(name)s::%(asctime)s] %(levelname)s:%(message)s"
16+
DEFAULT_FORMAT_WITH_THREADS = (
17+
"[%(name)s::%(threadName)s::%(asctime)s] %(levelname)s:%(message)s"
18+
)
1619
VERBOSE_DEPENDENCIES = ["urllib3", "PIL", "boto3", "botocore", "s3transfer"]
1720

1821

0 commit comments

Comments
 (0)