Logging Configuration:
Added a new method configure_logging to configure logging settings.
In the init method, called configure_logging to set up logging to a file named access_logs.log with an INFO level and a specific log format.
Access Attempt Logging:
In the log_access_attempt method:
Created a log message with the person's name and authorization status.
Used logging.info to log the access attempt in the specified format.
These changes address TODO 2 requirements related to configuring and logging access attempts in the access_logs.log file.
Fixes # 5 and 6
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Description
Logging Configuration: Added a new method configure_logging to configure logging settings. In the init method, called configure_logging to set up logging to a file named access_logs.log with an INFO level and a specific log format. Access Attempt Logging:
In the log_access_attempt method: Created a log message with the person's name and authorization status. Used logging.info to log the access attempt in the specified format. These changes address TODO 2 requirements related to configuring and logging access attempts in the access_logs.log file.
Fixes # 5 and 6
Type of change