Git Product home page Git Product logo

loginfo's Introduction

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": "[email protected]",
    "to_email": "[email protected]",
    "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:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.