mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-13 04:06:33 +00:00
Cleanup some logger (#2229)
This commit is contained in:
parent
e1b9d754af
commit
a976ef6e67
@ -73,7 +73,7 @@ class Auth(JsonConfig, CoreSysAttributes):
|
|||||||
|
|
||||||
# Check API state
|
# Check API state
|
||||||
if not await self.sys_homeassistant.api.check_api_state():
|
if not await self.sys_homeassistant.api.check_api_state():
|
||||||
_LOGGER.debug("Home Assistant not running, checking cache")
|
_LOGGER.info("Home Assistant not running, checking cache")
|
||||||
return cache_hit is True
|
return cache_hit is True
|
||||||
|
|
||||||
# No cache hit
|
# No cache hit
|
||||||
|
@ -95,7 +95,7 @@ async def initialize_coresys() -> CoreSys:
|
|||||||
coresys.machine = os.environ[ENV_SUPERVISOR_MACHINE]
|
coresys.machine = os.environ[ENV_SUPERVISOR_MACHINE]
|
||||||
elif os.environ.get(ENV_HOMEASSISTANT_REPOSITORY):
|
elif os.environ.get(ENV_HOMEASSISTANT_REPOSITORY):
|
||||||
coresys.machine = os.environ[ENV_HOMEASSISTANT_REPOSITORY][14:-14]
|
coresys.machine = os.environ[ENV_HOMEASSISTANT_REPOSITORY][14:-14]
|
||||||
_LOGGER.debug("Seting up coresys for machine: %s", coresys.machine)
|
_LOGGER.info("Seting up coresys for machine: %s", coresys.machine)
|
||||||
|
|
||||||
return coresys
|
return coresys
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ def initialize_system_data(coresys: CoreSys) -> None:
|
|||||||
|
|
||||||
# Supervisor addon data folder
|
# Supervisor addon data folder
|
||||||
if not config.path_addons_data.is_dir():
|
if not config.path_addons_data.is_dir():
|
||||||
_LOGGER.info(
|
_LOGGER.debug(
|
||||||
"Creating Supervisor Add-on data folder at '%s'", config.path_addons_data
|
"Creating Supervisor Add-on data folder at '%s'", config.path_addons_data
|
||||||
)
|
)
|
||||||
config.path_addons_data.mkdir(parents=True)
|
config.path_addons_data.mkdir(parents=True)
|
||||||
@ -286,7 +286,7 @@ def supervisor_debugger(coresys: CoreSys) -> None:
|
|||||||
|
|
||||||
debugpy.listen(("0.0.0.0", 33333))
|
debugpy.listen(("0.0.0.0", 33333))
|
||||||
if coresys.config.debug_block:
|
if coresys.config.debug_block:
|
||||||
_LOGGER.debug("Wait until debugger is attached")
|
_LOGGER.info("Wait until debugger is attached")
|
||||||
debugpy.wait_for_client()
|
debugpy.wait_for_client()
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ class Core(CoreSysAttributes):
|
|||||||
try:
|
try:
|
||||||
# HomeAssistant is already running / supervisor have only reboot
|
# HomeAssistant is already running / supervisor have only reboot
|
||||||
if self.sys_hardware.last_boot == self.sys_config.last_boot:
|
if self.sys_hardware.last_boot == self.sys_config.last_boot:
|
||||||
_LOGGER.debug("Supervisor reboot detected")
|
_LOGGER.info("Supervisor reboot detected")
|
||||||
return
|
return
|
||||||
|
|
||||||
# reset register services / discovery
|
# reset register services / discovery
|
||||||
@ -190,7 +190,7 @@ class Core(CoreSysAttributes):
|
|||||||
except HomeAssistantError as err:
|
except HomeAssistantError as err:
|
||||||
self.sys_capture_exception(err)
|
self.sys_capture_exception(err)
|
||||||
else:
|
else:
|
||||||
_LOGGER.debug("Skiping start of Home Assistant")
|
_LOGGER.info("Skiping start of Home Assistant")
|
||||||
|
|
||||||
# start addon mark as application
|
# start addon mark as application
|
||||||
await self.sys_addons.boot(AddonStartup.APPLICATION)
|
await self.sys_addons.boot(AddonStartup.APPLICATION)
|
||||||
|
@ -524,13 +524,13 @@ class DockerInterface(CoreSysAttributes):
|
|||||||
raise ValueError()
|
raise ValueError()
|
||||||
|
|
||||||
except (docker.errors.DockerException, ValueError) as err:
|
except (docker.errors.DockerException, ValueError) as err:
|
||||||
_LOGGER.debug("No version found for %s", self.image)
|
_LOGGER.info("No version found for %s", self.image)
|
||||||
raise DockerNotFound() from err
|
raise DockerNotFound() from err
|
||||||
except requests.RequestException as err:
|
except requests.RequestException as err:
|
||||||
_LOGGER.warning("Communication issues with dockerd on Host: %s", err)
|
_LOGGER.warning("Communication issues with dockerd on Host: %s", err)
|
||||||
raise DockerRequestError() from err
|
raise DockerRequestError() from err
|
||||||
else:
|
else:
|
||||||
_LOGGER.debug("Found %s versions: %s", self.image, available_version)
|
_LOGGER.info("Found %s versions: %s", self.image, available_version)
|
||||||
|
|
||||||
# Sort version and return latest version
|
# Sort version and return latest version
|
||||||
available_version.sort(key=pkg_version.parse, reverse=True)
|
available_version.sort(key=pkg_version.parse, reverse=True)
|
||||||
|
@ -61,4 +61,4 @@ class HomeAssistantSecrets(CoreSysAttributes):
|
|||||||
except (YAMLError, AttributeError) as err:
|
except (YAMLError, AttributeError) as err:
|
||||||
_LOGGER.error("Can't process Home Assistant secrets: %s", err)
|
_LOGGER.error("Can't process Home Assistant secrets: %s", err)
|
||||||
else:
|
else:
|
||||||
_LOGGER.debug("Reloading Home Assistant secrets: %s", len(self.secrets))
|
_LOGGER.info("Reloading Home Assistant secrets: %s", len(self.secrets))
|
||||||
|
@ -374,10 +374,7 @@ class CoreDNS(JsonConfig, CoreSysAttributes):
|
|||||||
def delete_host(self, host: str, write: bool = True) -> None:
|
def delete_host(self, host: str, write: bool = True) -> None:
|
||||||
"""Remove a entry from hosts."""
|
"""Remove a entry from hosts."""
|
||||||
entry = self._search_host([host])
|
entry = self._search_host([host])
|
||||||
|
|
||||||
# No match on hosts
|
|
||||||
if not entry:
|
if not entry:
|
||||||
_LOGGER.debug("Can't remove Host entry: %s", host)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.debug("Removing host entry %s - %s", entry.ip_address, entry.names)
|
_LOGGER.debug("Removing host entry %s - %s", entry.ip_address, entry.names)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user