From 6dcd7b87d60a1c11fb0993e38f809a480c466c07 Mon Sep 17 00:00:00 2001 From: Gaurav Singh Date: Wed, 3 Oct 2018 12:56:43 +0530 Subject: [PATCH] logging format contains process id and thread name also --- rpqueue/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpqueue/__init__.py b/rpqueue/__init__.py index d27f22c..0d52152 100644 --- a/rpqueue/__init__.py +++ b/rpqueue/__init__.py @@ -146,7 +146,8 @@ def set_key_prefix(pfix): LOG_LEVELS = dict((v, getattr(logging, v)) for v in ['DEBUG', 'INFO', 'WARNING', 'ERROR']) LOG_LEVEL = 'debug' -logging.basicConfig() +FORMAT = '%(levelname)s:%(name)s:%(process)s:%(threadName)s:%(message)s' +logging.basicConfig(format=FORMAT) log_handler = logging.root SUCCESS_LOG_LEVEL = 'debug'