mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Rename the logger to plain "logger".
This commit is contained in:
parent
b795aa8547
commit
fc29e0f37e
15 changed files with 61 additions and 60 deletions
|
@ -17,7 +17,7 @@ from . import events
|
|||
from . import futures
|
||||
from . import selectors
|
||||
from . import transports
|
||||
from .log import asyncio_log
|
||||
from .log import logger
|
||||
|
||||
|
||||
class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
||||
|
@ -31,7 +31,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
|||
|
||||
if selector is None:
|
||||
selector = selectors.DefaultSelector()
|
||||
asyncio_log.debug('Using selector: %s', selector.__class__.__name__)
|
||||
logger.debug('Using selector: %s', selector.__class__.__name__)
|
||||
self._selector = selector
|
||||
self._make_self_pipe()
|
||||
|
||||
|
@ -105,7 +105,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
|
|||
sock.close()
|
||||
# There's nowhere to send the error, so just log it.
|
||||
# TODO: Someone will want an error handler for this.
|
||||
asyncio_log.exception('Accept failed')
|
||||
logger.exception('Accept failed')
|
||||
else:
|
||||
if ssl:
|
||||
self._make_ssl_transport(
|
||||
|
@ -363,7 +363,7 @@ class _SelectorTransport(transports.Transport):
|
|||
|
||||
def _fatal_error(self, exc):
|
||||
# should be called from exception handler only
|
||||
asyncio_log.exception('Fatal error for %s', self)
|
||||
logger.exception('Fatal error for %s', self)
|
||||
self._force_close(exc)
|
||||
|
||||
def _force_close(self, exc):
|
||||
|
@ -444,7 +444,7 @@ class _SelectorSocketTransport(_SelectorTransport):
|
|||
|
||||
if self._conn_lost:
|
||||
if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES:
|
||||
asyncio_log.warning('socket.send() raised exception.')
|
||||
logger.warning('socket.send() raised exception.')
|
||||
self._conn_lost += 1
|
||||
return
|
||||
|
||||
|
@ -667,7 +667,7 @@ class _SelectorSslTransport(_SelectorTransport):
|
|||
|
||||
if self._conn_lost:
|
||||
if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES:
|
||||
asyncio_log.warning('socket.send() raised exception.')
|
||||
logger.warning('socket.send() raised exception.')
|
||||
self._conn_lost += 1
|
||||
return
|
||||
|
||||
|
@ -714,7 +714,7 @@ class _SelectorDatagramTransport(_SelectorTransport):
|
|||
|
||||
if self._conn_lost and self._address:
|
||||
if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES:
|
||||
asyncio_log.warning('socket.send() raised exception.')
|
||||
logger.warning('socket.send() raised exception.')
|
||||
self._conn_lost += 1
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue