Fix has_log value

This commit is contained in:
Eran Kampf 2017-06-15 11:21:08 -07:00 committed by GitHub
parent 2dfb061063
commit 77cf0b678a

View File

@ -567,6 +567,7 @@ class Sanic:
host, port = host or "127.0.0.1", port or 8000
if log_config:
self.log_config = log_config
logging.config.dictConfig(log_config)
if protocol is None:
protocol = (WebSocketProtocol if self.websocket_enabled
@ -580,7 +581,7 @@ class Sanic:
host=host, port=port, debug=debug, ssl=ssl, sock=sock,
workers=workers, protocol=protocol, backlog=backlog,
register_sys_signals=register_sys_signals,
has_log=log_config is not None)
has_log=self.log_config is not None)
try:
self.is_running = True