From cb0a9f5c63f3e7a5fd05914fe3ae5c632ac605f6 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 29 May 2018 16:43:16 +0000 Subject: [PATCH] Fixed logging level setting in pusher --- platypush/pusher/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platypush/pusher/__init__.py b/platypush/pusher/__init__.py index 2c0e1e48d..d85cf6f20 100644 --- a/platypush/pusher/__init__.py +++ b/platypush/pusher/__init__.py @@ -48,8 +48,11 @@ class Pusher(object): # Initialize the configuration self.config_file = config_file + log_conf = Config.get('logging') Config.init(config_file) - logging.basicConfig(level=Config.get('logging'), stream=sys.stdout) + logging.basicConfig(level=log_conf['level'] + if log_conf and 'level' in log_conf + else logging.info, stream=sys.stdout) self.on_response = on_response or self.default_on_response() self.backend = backend or Config.get_default_pusher_backend()