diff --git a/src/bdc/steps/google_places.py b/src/bdc/steps/google_places.py index 96dea27..94dde24 100644 --- a/src/bdc/steps/google_places.py +++ b/src/bdc/steps/google_places.py @@ -228,7 +228,7 @@ def get_first_place_candidate(self, query, input_type) -> (dict, int): return None, 0 if not response["status"] == HTTPStatus.OK.name: - log.warning( + log.debug( f"Failed to fetch data. Status code: {response['status']}", ) return None, 0 diff --git a/src/bdc/steps/helpers/generate_hash_leads.py b/src/bdc/steps/helpers/generate_hash_leads.py index ea66c0f..4ab3ef0 100644 --- a/src/bdc/steps/helpers/generate_hash_leads.py +++ b/src/bdc/steps/helpers/generate_hash_leads.py @@ -7,7 +7,6 @@ import pandas as pd -from bdc.steps.step import Step from database import get_database from logger import get_logger @@ -56,12 +55,12 @@ def hash_check( if lead_hash in lookup_table: # If the hash exists in the lookup table, return the corresponding data - log.info(f"Hash {lead_hash} already exists in the lookup table.") + log.debug(f"Hash {lead_hash} already exists in the lookup table.") try: previous_data = lead_data[fields_tofill] return previous_data except KeyError as e: - log.info( + log.debug( f"Hash is present but data fields {fields_tofill} were not found." ) lookup_table[lead_hash] = lookup_table[lead_hash][:-1] + [ diff --git a/src/database/leads/local_repository.py b/src/database/leads/local_repository.py index f41ba1d..3bade62 100644 --- a/src/database/leads/local_repository.py +++ b/src/database/leads/local_repository.py @@ -81,7 +81,7 @@ def save_review(self, review, place_id, force_refresh=False): json_file_path = os.path.join(self.REVIEWS, file_name) if os.path.exists(json_file_path): - log.info(f"Reviews for {place_id} already exist") + log.debug(f"Reviews for {place_id} already exist") return with open(json_file_path, "w", encoding="utf-8") as json_file: diff --git a/src/logger/logger.py b/src/logger/logger.py index ccd9eb1..fe08296 100644 --- a/src/logger/logger.py +++ b/src/logger/logger.py @@ -54,7 +54,7 @@ def __init__(self, name, log_dir=None): # Create stream handler for logging to stdout (log all five levels) self.stdout_handler = logging.StreamHandler(sys.stdout) - self.stdout_handler.setLevel(logging.DEBUG) + self.stdout_handler.setLevel(logging.INFO) self.stdout_handler.setFormatter(StdOutFormatter()) self.enable_console_output()