
# # logger_config.py
# import logging
# import os

# def setup_logging():
#     """
#     Sets up logging for the application.
#     """
#     logs_dir = 'logs'
#     os.makedirs(logs_dir, exist_ok=True)  # Ensure the 'logs' directory exists

#     logger = logging.getLogger(__name__)
#     logger.setLevel(logging.INFO)

#     # Create a file handler and set the formatter
#     file_handler = logging.FileHandler(os.path.join(logs_dir, 'fpl_data.log'))
#     formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
#     file_handler.setFormatter(formatter)

#     # Add the file handler to the logger
#     logger.addHandler(file_handler)

#     # Optional: Add a stream handler to also log to the console
   

#     return logger

# # Initialize the logger when this module is imported
# logger = setup_logging()


