|
18 | 18 | from . import selector_events |
19 | 19 | from . import tasks |
20 | 20 | from . import transports |
21 | | -from .log import asyncio_log |
| 21 | +from .log import logger |
22 | 22 |
|
23 | 23 |
|
24 | 24 | __all__ = ['SelectorEventLoop', 'STDIN', 'STDOUT', 'STDERR'] |
@@ -79,7 +79,7 @@ def add_signal_handler(self, sig, callback, *args): |
79 | 79 | try: |
80 | 80 | signal.set_wakeup_fd(-1) |
81 | 81 | except ValueError as nexc: |
82 | | - asyncio_log.info('set_wakeup_fd(-1) failed: %s', nexc) |
| 82 | + logger.info('set_wakeup_fd(-1) failed: %s', nexc) |
83 | 83 |
|
84 | 84 | if exc.errno == errno.EINVAL: |
85 | 85 | raise RuntimeError('sig {} cannot be caught'.format(sig)) |
@@ -124,7 +124,7 @@ def remove_signal_handler(self, sig): |
124 | 124 | try: |
125 | 125 | signal.set_wakeup_fd(-1) |
126 | 126 | except ValueError as exc: |
127 | | - asyncio_log.info('set_wakeup_fd(-1) failed: %s', exc) |
| 127 | + logger.info('set_wakeup_fd(-1) failed: %s', exc) |
128 | 128 |
|
129 | 129 | return True |
130 | 130 |
|
@@ -185,7 +185,7 @@ def _sig_chld(self): |
185 | 185 | if transp is not None: |
186 | 186 | transp._process_exited(returncode) |
187 | 187 | except Exception: |
188 | | - asyncio_log.exception('Unknown exception in SIGCHLD handler') |
| 188 | + logger.exception('Unknown exception in SIGCHLD handler') |
189 | 189 |
|
190 | 190 | def _subprocess_closed(self, transport): |
191 | 191 | pid = transport.get_pid() |
@@ -244,7 +244,7 @@ def close(self): |
244 | 244 |
|
245 | 245 | def _fatal_error(self, exc): |
246 | 246 | # should be called by exception handler only |
247 | | - asyncio_log.exception('Fatal error for %s', self) |
| 247 | + logger.exception('Fatal error for %s', self) |
248 | 248 | self._close(exc) |
249 | 249 |
|
250 | 250 | def _close(self, exc): |
@@ -294,8 +294,8 @@ def write(self, data): |
294 | 294 |
|
295 | 295 | if self._conn_lost or self._closing: |
296 | 296 | if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES: |
297 | | - asyncio_log.warning('pipe closed by peer or ' |
298 | | - 'os.write(pipe, data) raised exception.') |
| 297 | + logger.warning('pipe closed by peer or ' |
| 298 | + 'os.write(pipe, data) raised exception.') |
299 | 299 | self._conn_lost += 1 |
300 | 300 | return |
301 | 301 |
|
@@ -369,7 +369,7 @@ def abort(self): |
369 | 369 |
|
370 | 370 | def _fatal_error(self, exc): |
371 | 371 | # should be called by exception handler only |
372 | | - asyncio_log.exception('Fatal error for %s', self) |
| 372 | + logger.exception('Fatal error for %s', self) |
373 | 373 | self._close(exc) |
374 | 374 |
|
375 | 375 | def _close(self, exc=None): |
|
0 commit comments