fix original code logic
This commit is contained in:
parent
66923bc0e3
commit
c5f137c715
|
@ -31,9 +31,9 @@ class Sanic:
|
||||||
log_config=DEFAULT_LOG_CONF):
|
log_config=DEFAULT_LOG_CONF):
|
||||||
if log_config:
|
if log_config:
|
||||||
logging.config.dictConfig(log_config)
|
logging.config.dictConfig(log_config)
|
||||||
else:
|
|
||||||
# Only set up a default log handler if the
|
# Only set up a default log handler if the
|
||||||
# end-user application didn't set anything up.
|
# end-user application didn't set anything up.
|
||||||
|
if not logging.root.handlers and log.level == logging.NOTSET:
|
||||||
formatter = logging.Formatter(
|
formatter = logging.Formatter(
|
||||||
"%(asctime)s: %(levelname)s: %(message)s")
|
"%(asctime)s: %(levelname)s: %(message)s")
|
||||||
handler = logging.StreamHandler()
|
handler = logging.StreamHandler()
|
||||||
|
@ -448,6 +448,7 @@ class Sanic:
|
||||||
# -------------------------------------------- #
|
# -------------------------------------------- #
|
||||||
# Request Middleware
|
# Request Middleware
|
||||||
# -------------------------------------------- #
|
# -------------------------------------------- #
|
||||||
|
|
||||||
request.app = self
|
request.app = self
|
||||||
response = await self._run_request_middleware(request)
|
response = await self._run_request_middleware(request)
|
||||||
# No middleware results
|
# No middleware results
|
||||||
|
|
Loading…
Reference in New Issue
Block a user