diff --git a/hassio/bootstrap.py b/hassio/bootstrap.py index 9ba8af4c2..8b37525b7 100644 --- a/hassio/bootstrap.py +++ b/hassio/bootstrap.py @@ -120,7 +120,8 @@ def initialize_system_data(coresys): _LOGGER.info("Create Hass.io Apparmor folder %s", config.path_apparmor) config.path_apparmor.mkdir() - return config + # Update log level + coresys.config.modify_log_level() def migrate_system_env(coresys): diff --git a/hassio/config.py b/hassio/config.py index 4fc4b819d..ca386a7b8 100644 --- a/hassio/config.py +++ b/hassio/config.py @@ -91,6 +91,12 @@ class CoreConfig(JsonConfig): def logging(self, value: str): """Set system log level.""" self._data[ATTR_LOGGING] = value + self.modify_log_level() + + def modify_log_level(self) -> None: + """Change log level.""" + lvl = getattr(logging, self.logging.upper()) + logging.basicConfig(level=lvl) @property def last_boot(self):