From 04840b3cd52f6e5bff1e6f217b9037cf23d85a00 Mon Sep 17 00:00:00 2001 From: aj Date: Sun, 18 Aug 2019 09:44:34 +0100 Subject: [PATCH] reverted logging to retrieving default handler --- spotframework/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spotframework/__init__.py b/spotframework/__init__.py index 4125da8..45e6c44 100644 --- a/spotframework/__init__.py +++ b/spotframework/__init__.py @@ -6,13 +6,12 @@ logger.setLevel('DEBUG') if os.environ.get('DEPLOY_DESTINATION', None) == 'PROD': from google.cloud import logging as glogging - from google.cloud.logging.handlers import CloudLoggingHandler log_format = '%(funcName)s - %(message)s' formatter = logging.Formatter(log_format) client = glogging.Client() - handler = CloudLoggingHandler(client, name='spotframework') + handler = client.get_default_handler() handler.setFormatter(formatter)