From 24a98826a04ae13eaef6bcd5f29800acea2a5c24 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 21 Oct 2020 08:10:38 -0400 Subject: [PATCH] Use a standard library logger. --- synapse/logging/_remote.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/logging/_remote.py b/synapse/logging/_remote.py index 136e704d37d4..ba45424f0274 100644 --- a/synapse/logging/_remote.py +++ b/synapse/logging/_remote.py @@ -34,7 +34,8 @@ ) from twisted.internet.interfaces import IPushProducer, ITransport from twisted.internet.protocol import Factory, Protocol -from twisted.logger import Logger + +logger = logging.getLogger(__name__) @attr.s @@ -108,7 +109,6 @@ def __init__( self._buffer = deque() # type: Deque[logging.LogRecord] self._connection_waiter = None # type: Optional[Deferred] - self._logger = Logger() self._producer = None # type: Optional[LogProducer] # Connect without DNS lookups if it's a direct IP. @@ -226,7 +226,7 @@ def emit(self, record: logging.LogRecord) -> None: # If handling backpressure fails, clear the buffer and log the # exception. self._buffer.clear() - self._logger.failure("Failed clearing backpressure") + logger.warning("Failed clearing backpressure") # Try and write immediately. self._connect()