Don't log "enabled" if auto-reload disabled

Fixes #2240
This commit is contained in:
Ashley Sommer 2021-09-29 11:26:15 +10:00 committed by GitHub
parent 595d2c76ac
commit eee4466c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1337,7 +1337,8 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
logger.info(f"Goin' Fast @ {proto}://{host}:{port}")
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}")
return server_settings