mirror of
https://github.com/django/daphne.git
synced 2024-11-21 23:46:33 +03:00
Use loggers rather then the logging module directly
Refs django/channels#846
This commit is contained in:
parent
990656a36d
commit
3b2fb6f78e
|
@ -221,7 +221,7 @@ class WebRequest(http.Request):
|
|||
"size": self.sentLength,
|
||||
})
|
||||
except Exception as e:
|
||||
logging.error(traceback.format_exc())
|
||||
logger.error(traceback.format_exc())
|
||||
else:
|
||||
logger.debug("HTTP response chunk for %s", self.client_addr)
|
||||
else:
|
||||
|
|
|
@ -189,7 +189,7 @@ class Server(object):
|
|||
# Protocol is asking the server to exit (likely during test)
|
||||
self.stop()
|
||||
else:
|
||||
logging.error(
|
||||
logger.error(
|
||||
"Exception inside application: {}\n{}{}".format(
|
||||
exception,
|
||||
"".join(traceback.format_tb(
|
||||
|
@ -216,7 +216,7 @@ class Server(object):
|
|||
if not application_instance.done():
|
||||
application_instance.cancel()
|
||||
wait_for.append(application_instance)
|
||||
logging.info("Killed %i pending application instances", len(wait_for))
|
||||
logger.info("Killed %i pending application instances", len(wait_for))
|
||||
# Make Twisted wait until they're all dead
|
||||
wait_deferred = defer.Deferred.fromFuture(asyncio.gather(*wait_for))
|
||||
wait_deferred.addErrback(lambda x: None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user