Cleanup some logger (#2229)

This commit is contained in:
Pascal Vizeli 2020-11-09 09:56:01 +01:00 committed by GitHub
parent e1b9d754af
commit a976ef6e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 12 deletions

View File

@ -73,7 +73,7 @@ class Auth(JsonConfig, CoreSysAttributes):
# 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
# No cache hit

View File

@ -95,7 +95,7 @@ async def initialize_coresys() -> CoreSys:
coresys.machine = os.environ[ENV_SUPERVISOR_MACHINE]
elif os.environ.get(ENV_HOMEASSISTANT_REPOSITORY):
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
@ -119,7 +119,7 @@ def initialize_system_data(coresys: CoreSys) -> None:
# Supervisor addon data folder
if not config.path_addons_data.is_dir():
_LOGGER.info(
_LOGGER.debug(
"Creating Supervisor Add-on data folder at '%s'", config.path_addons_data
)
config.path_addons_data.mkdir(parents=True)
@ -286,7 +286,7 @@ def supervisor_debugger(coresys: CoreSys) -> None:
debugpy.listen(("0.0.0.0", 33333))
if coresys.config.debug_block:
_LOGGER.debug("Wait until debugger is attached")
_LOGGER.info("Wait until debugger is attached")
debugpy.wait_for_client()

View File

@ -162,7 +162,7 @@ class Core(CoreSysAttributes):
try:
# HomeAssistant is already running / supervisor have only reboot
if self.sys_hardware.last_boot == self.sys_config.last_boot:
_LOGGER.debug("Supervisor reboot detected")
_LOGGER.info("Supervisor reboot detected")
return
# reset register services / discovery
@ -190,7 +190,7 @@ class Core(CoreSysAttributes):
except HomeAssistantError as err:
self.sys_capture_exception(err)
else:
_LOGGER.debug("Skiping start of Home Assistant")
_LOGGER.info("Skiping start of Home Assistant")
# start addon mark as application
await self.sys_addons.boot(AddonStartup.APPLICATION)

View File

@ -524,13 +524,13 @@ class DockerInterface(CoreSysAttributes):
raise ValueError()
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
except requests.RequestException as err:
_LOGGER.warning("Communication issues with dockerd on Host: %s", err)
raise DockerRequestError() from err
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
available_version.sort(key=pkg_version.parse, reverse=True)

View File

@ -61,4 +61,4 @@ class HomeAssistantSecrets(CoreSysAttributes):
except (YAMLError, AttributeError) as err:
_LOGGER.error("Can't process Home Assistant secrets: %s", err)
else:
_LOGGER.debug("Reloading Home Assistant secrets: %s", len(self.secrets))
_LOGGER.info("Reloading Home Assistant secrets: %s", len(self.secrets))

View File

@ -374,10 +374,7 @@ class CoreDNS(JsonConfig, CoreSysAttributes):
def delete_host(self, host: str, write: bool = True) -> None:
"""Remove a entry from hosts."""
entry = self._search_host([host])
# No match on hosts
if not entry:
_LOGGER.debug("Can't remove Host entry: %s", host)
return
_LOGGER.debug("Removing host entry %s - %s", entry.ip_address, entry.names)