Skip to content

Commit

Permalink
Removed changes to logging that broke fwx script (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
KYSIEMENS authored Dec 1, 2023
1 parent ccf37a2 commit c7563fd
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions scripts/python/main_fwx_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
import fwx_typedicts
import requests

LOGGER = logging.getLogger(__name__)
# setting up the logging
cur_path = os.path.dirname(__file__)
logger_name = os.path.basename(__file__).split('.')[0]
print(logger_name)
log_config_path = os.path.join(cur_path, 'logging.config')
logging.config.fileConfig(log_config_path, disable_existing_loggers=False)
LOGGER = logging.getLogger(logger_name)
LOGGER.info(f"starting {logger_name}")
LOGGER.debug(f"cur_path: {cur_path}")

Expand Down Expand Up @@ -324,15 +330,5 @@ def get_file_path(self) -> str:


if __name__ == '__main__':
# setting up the logging
cur_path = os.path.dirname(__file__)
logger_name = os.path.basename(__file__).split('.')[0]
print(logger_name)
log_config_path = os.path.join(cur_path, 'logging.config')
logging.config.fileConfig(log_config_path, disable_existing_loggers=False)
LOGGER = logging.getLogger(logger_name)
LOGGER.info(f"starting {logger_name}")
LOGGER.debug(f"cur_path: {cur_path}")

wf_api = WildfireAPI()
hourlies = wf_api.get_all_stations_hourlies()

0 comments on commit c7563fd

Please sign in to comment.