Skip to content

Commit

Permalink
Finalize weather logging
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Nov 25, 2024
1 parent a4de492 commit 5727076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions weather/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import terrariumLogging

logger = terrariumLogging.logging.getLogger(__name__)
logger = terrariumLogging.logging.getLogger("terrariumWeather")

from abc import ABCMeta, abstractmethod
import copy
Expand Down Expand Up @@ -47,7 +47,7 @@ def update(self):
self._device["last_update"] is None
or (datetime.now() - self._device["last_update"]).total_seconds() > self.__UPDATE_TIMEOUT
):
logger.info(f"Loading online weather data from source: {self.address}")
logger.debug(f"Loading online weather data from source: {self.address}")

if self._load_data():
# Convert values to the right unit values
Expand Down
4 changes: 2 additions & 2 deletions weather/openweathermap_org_weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __load_general_data(self):

address = terrariumUtils.parse_url(self.address.lower())
self.__appid = address["query_params"]["appid"]
logger.info(f"Loaded basic weather data from source {self.address.lower()} in {time()-start:.2f} seconds.")
logger.info(f"Loaded basic weather data in {time()-start:.2f} seconds.")

return True

Expand Down Expand Up @@ -89,7 +89,7 @@ def __load_minimal_forecast_data(self):
}
)

logger.info(f"Loaded minimal forecast data from source {url} in {time()-start:.2f} seconds.")
logger.info(f"Loaded minimal forecast data in {time()-start:.2f} seconds.")
self.__one_call_version = "free"
return True

Expand Down

0 comments on commit 5727076

Please sign in to comment.