Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use a standard library logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Oct 21, 2020
1 parent fcb74ae commit 24a9882
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synapse/logging/_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()

0 comments on commit 24a9882

Please sign in to comment.