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, ))