priya-zha / Software-Engineering-Project

0 stars 2 forks source link

I’ve added logging using Python's logging module for debugging and monitoring the application #17

Open srija17-007 opened 1 year ago

srija17-007 commented 1 year ago

For better understanding and helps finding the error in the code, I’ve added logging using Python's logging module. Log messages are written to a file named app.log, and log entries include timestamps, log levels, and message details. The logger.info and logger.error statements are used to record information and errors in your application. I’ve added log messages to provide information about the processing of images, making it easier to track the execution flow.These logs can be helpful for debugging and monitoring the application. Additionally, you can configure log rotation and use log aggregation tools to manage and analyze the log data.

Updated Code

import logging logger.info("Processing image") logger.info("Image processing completed")

except Exception as e:
    logger.error(f"Error processing image: {str(e)}")
    return None