reverted logging to retrieving default handler

This commit is contained in:
aj 2019-08-18 09:44:34 +01:00
parent 9af0b4f03d
commit 04840b3cd5

View File

@ -6,13 +6,12 @@ logger.setLevel('DEBUG')
if os.environ.get('DEPLOY_DESTINATION', None) == 'PROD': if os.environ.get('DEPLOY_DESTINATION', None) == 'PROD':
from google.cloud import logging as glogging from google.cloud import logging as glogging
from google.cloud.logging.handlers import CloudLoggingHandler
log_format = '%(funcName)s - %(message)s' log_format = '%(funcName)s - %(message)s'
formatter = logging.Formatter(log_format) formatter = logging.Formatter(log_format)
client = glogging.Client() client = glogging.Client()
handler = CloudLoggingHandler(client, name='spotframework') handler = client.get_default_handler()
handler.setFormatter(formatter) handler.setFormatter(formatter)