Don't log "enabled" if auto-reload disabled (#2247)

Fixes #2240

Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
This commit is contained in:
Ashley Sommer 2021-09-29 21:08:46 +10:00 committed by GitHub
parent ba2670e99c
commit b5f2bd9b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1330,7 +1330,8 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
logger.info(f"Goin' Fast @ {proto}://{host}:{port}") logger.info(f"Goin' Fast @ {proto}://{host}:{port}")
debug_mode = "enabled" if self.debug else "disabled" debug_mode = "enabled" if self.debug else "disabled"
logger.debug("Sanic auto-reload: enabled") reload_mode = "enabled" if auto_reload else "disabled"
logger.debug(f"Sanic auto-reload: {reload_mode}")
logger.debug(f"Sanic debug mode: {debug_mode}") logger.debug(f"Sanic debug mode: {debug_mode}")
return server_settings return server_settings