mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-10 02:36:29 +00:00
parent
16ef6d82d2
commit
608c0e5076
@ -120,7 +120,8 @@ def initialize_system_data(coresys):
|
|||||||
_LOGGER.info("Create Hass.io Apparmor folder %s", config.path_apparmor)
|
_LOGGER.info("Create Hass.io Apparmor folder %s", config.path_apparmor)
|
||||||
config.path_apparmor.mkdir()
|
config.path_apparmor.mkdir()
|
||||||
|
|
||||||
return config
|
# Update log level
|
||||||
|
coresys.config.modify_log_level()
|
||||||
|
|
||||||
|
|
||||||
def migrate_system_env(coresys):
|
def migrate_system_env(coresys):
|
||||||
|
@ -91,6 +91,12 @@ class CoreConfig(JsonConfig):
|
|||||||
def logging(self, value: str):
|
def logging(self, value: str):
|
||||||
"""Set system log level."""
|
"""Set system log level."""
|
||||||
self._data[ATTR_LOGGING] = value
|
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
|
@property
|
||||||
def last_boot(self):
|
def last_boot(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user