From 10e6f998be063854112ddf38241ceb6e213f5aef Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Tue, 28 Nov 2017 16:13:54 -0800 Subject: [PATCH] Using logger for module in Pub/Sub publisher. (#4473) --- pubsub/google/cloud/pubsub_v1/publisher/batch/thread.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pubsub/google/cloud/pubsub_v1/publisher/batch/thread.py b/pubsub/google/cloud/pubsub_v1/publisher/batch/thread.py index df7d23ffe7d8..8ffe1b626515 100644 --- a/pubsub/google/cloud/pubsub_v1/publisher/batch/thread.py +++ b/pubsub/google/cloud/pubsub_v1/publisher/batch/thread.py @@ -24,6 +24,9 @@ from google.cloud.pubsub_v1.publisher.batch import base +_LOGGER = logging.getLogger(__name__) + + class Batch(base.Batch): """A batch of messages. @@ -173,7 +176,7 @@ def _commit(self): self.messages, ) end = time.time() - logging.getLogger().debug('gRPC Publish took {s} seconds.'.format( + _LOGGER.debug('gRPC Publish took {s} seconds.'.format( s=end - start, ))