Python 3.10
███████╗██████╗ ██████╗ ██████╗ ██████╗ ███████╗ ██╗ ██╗ █████╗ ███╗ ██╗██████╗ ██╗ ███████╗██████╗
██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝ ██║ ██║██╔══██╗████╗ ██║██╔══██╗██║ ██╔════╝██╔══██╗
█████╗ ██████╔╝██████╔╝██║ ██║██████╔╝███████╗ ███████║███████║██╔██╗ ██║██║ ██║██║ █████╗ ██████╔╝
██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗╚════██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██║██║ ██╔══╝ ██╔══██╗
███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║███████║ ██║ ██║██║ ██║██║ ╚████║██████╔╝███████╗███████╗██║ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝
ndler for Python applications. It provides comprehensive error logging features, including logging to files and console output. The module comes in 3 versions: one without email notification support and another one with email notification support for critical errors, and a last one displaying errors pop ups.
- 📄 Log messages to files with customizable log file names.
- 🖥️ Display log messages in the console.
- 📧 (Optional) Send email notifications for critical errors (available in the version with email support).
- 💡 Easily configurable and importable in your Python projects.
- 📈 Filter log messages based on severity levels.
- 💬 Pop ups handled by QMessageBox.
- Import the
logInfo.py
file in your Python project:
from logInfo import configLogs
- Create a logger instance using the configure_logger function:
email_config = {
"from_email": "your-email@example.com",
"to_email": "recipient@example.com",
"email_password": "your-email-password",
"smtp_server": "smtp.example.com",
"smtp_port": 465
}
logger = configure_logger("LoggerName", "log_file.log", email_config=email_config)
- Use the logger to record messages based on the error level:
logger.debug("Debug level message")
logger.info("Info level message")
logger.warning("Warning level message")
logger.error("Error level message")
logger.critical("Critical level message")
This repository is released under the MIT License. Please see the LICENSE
file for more information.
If you have any questions or need support, please feel free to open an issue or join my twitter.
Find more uncomplicated, GUI-free yet easy-to-use scripts here: