Skip to content

Latest commit

 

History

History
77 lines (52 loc) · 3.95 KB

README.md

File metadata and controls

77 lines (52 loc) · 3.95 KB

Python 3.10

███████╗██████╗ ██████╗  ██████╗ ██████╗ ███████╗    ██╗  ██╗ █████╗ ███╗   ██╗██████╗ ██╗     ███████╗██████╗ 
██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝    ██║  ██║██╔══██╗████╗  ██║██╔══██╗██║     ██╔════╝██╔══██╗
█████╗  ██████╔╝██████╔╝██║   ██║██████╔╝███████╗    ███████║███████║██╔██╗ ██║██║  ██║██║     █████╗  ██████╔╝
██╔══╝  ██╔══██╗██╔══██╗██║   ██║██╔══██╗╚════██║    ██╔══██║██╔══██║██║╚██╗██║██║  ██║██║     ██╔══╝  ██╔══██╗
███████╗██║  ██║██║  ██║╚██████╔╝██║  ██║███████║    ██║  ██║██║  ██║██║ ╚████║██████╔╝███████╗███████╗██║  ██║
╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═════╝ ╚══════╝╚══════╝╚═╝  ╚═╝
                                                                                                               

Python Logging License: MIT

📝 Description

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.

🔑 Key Features

  • 📄 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.

🛠️ Usage

  1. Import the logInfo.py file in your Python project:
   from logInfo import configLogs
  1. 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)
  1. 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")

📜 License

This repository is released under the MIT License. Please see the LICENSE file for more information.

❓ Support & Questions

If you have any questions or need support, please feel free to open an issue or join my twitter.

💎 Recommendations

Find more uncomplicated, GUI-free yet easy-to-use scripts here: