This PR implements a centralized logging configuration system as part of Sprint3. The changes establish consistent logging practices across the application by moving all logging configuration to settings.py and introducing a standardized way to create loggers for each module.
Added get_logger() function to create properly named loggers for each module
Migrated existing logging from individual module-level configuration to the centralized system
All future files should use the following:
from settings import get_loggerlogger = get_logger(__name__)logger.info("message")
Updated all modules to use the new logging approach:
check_panel.py
generate_bed.py
panel_app_api_functions.py
variant_validator_api_functions.py
The new logging system provides better debugging capabilities while maintaining clean production logs, with proper module attribution for all log messages.
Testing (no unit tests set up for the logger, as I'm not sure that is normal?):
Tested both file and console output
Verified log rotation works as expected
Confirmed correct module names appear in log messages.
Note that API requests will be logged with a urllib3.connectionpool module name because of how the requests library works.
Checked different log levels are properly filtered
This change is a good step of contribution towards Sprint3, and also ticks a lot of boxes for the marking rubric. See below the top level of Software integrity and code quality section:
In addition: Appropriate logging levels are used throughout i.e., debug, info, warning, error; A mechanism has been put in place to record log unexpected exceptions; Logging is directed to the stream as well as a log file and the log level for each is selectable; The log file is replaced by a rotating log file to prevent the disk from filling
This PR implements a centralized logging configuration system as part of Sprint3. The changes establish consistent logging practices across the application by moving all logging configuration to settings.py and introducing a standardized way to create loggers for each module.
Key changes:
from settings import get_logger
logger = get_logger(__name__)
logger.info("message")
The new logging system provides better debugging capabilities while maintaining clean production logs, with proper module attribution for all log messages.
Testing (no unit tests set up for the logger, as I'm not sure that is normal?):
This change is a good step of contribution towards Sprint3, and also ticks a lot of boxes for the marking rubric. See below the top level of Software integrity and code quality section:
Resolves #59