diff --git a/supervisor/bootstrap.py b/supervisor/bootstrap.py index 2bec03401..344897857 100644 --- a/supervisor/bootstrap.py +++ b/supervisor/bootstrap.py @@ -54,6 +54,14 @@ async def initialize_coresys() -> CoreSys: """Initialize supervisor coresys/objects.""" coresys = await CoreSys().load_config() + # Check if ENV is in development mode + if coresys.dev: + _LOGGER.warning("Environment variable 'SUPERVISOR_DEV' is set") + coresys.config.logging = LogLevel.DEBUG + coresys.config.debug = True + else: + coresys.config.modify_log_level() + # Initialize core objects coresys.docker = await DockerAPI(coresys).post_init() coresys.resolution = await ResolutionManager(coresys).load_config() @@ -93,15 +101,9 @@ async def initialize_coresys() -> CoreSys: # bootstrap config initialize_system(coresys) - # Check if ENV is in development mode if coresys.dev: - _LOGGER.warning("Environment variable 'SUPERVISOR_DEV' is set") - coresys.config.logging = LogLevel.DEBUG - coresys.config.debug = True coresys.updater.channel = UpdateChannel.DEV coresys.security.content_trust = False - else: - coresys.config.modify_log_level() # Convert datetime logging.Formatter.converter = lambda *args: coresys.now().timetuple()