https://github.com/secret-guest/loginfo
An enhanced error handler for Python applications.
https://github.com/secret-guest/loginfo
application-monitoring console-output critical-errors debug email-alerts error-handling error-reporting exception-handling info log-analysis log-files log-filtering log-levels log-management logger-configuration logging message-formatting notifications python warning
Last synced: over 1 year ago
JSON representation
An enhanced error handler for Python applications.
- Host: GitHub
- URL: https://github.com/secret-guest/loginfo
- Owner: SECRET-GUEST
- License: mit
- Created: 2023-04-25T12:24:18.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T05:28:37.000Z (over 2 years ago)
- Last Synced: 2025-01-08T04:36:29.382Z (over 1 year ago)
- Topics: application-monitoring, console-output, critical-errors, debug, email-alerts, error-handling, error-reporting, exception-handling, info, log-analysis, log-files, log-filtering, log-levels, log-management, logger-configuration, logging, message-formatting, notifications, python, warning
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Python 3.10
```
███████╗██████╗ ██████╗ ██████╗ ██████╗ ███████╗ ██╗ ██╗ █████╗ ███╗ ██╗██████╗ ██╗ ███████╗██████╗
██╔════╝██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝ ██║ ██║██╔══██╗████╗ ██║██╔══██╗██║ ██╔════╝██╔══██╗
█████╗ ██████╔╝██████╔╝██║ ██║██████╔╝███████╗ ███████║███████║██╔██╗ ██║██║ ██║██║ █████╗ ██████╔╝
██╔══╝ ██╔══██╗██╔══██╗██║ ██║██╔══██╗╚════██║ ██╔══██║██╔══██║██║╚██╗██║██║ ██║██║ ██╔══╝ ██╔══██╗
███████╗██║ ██║██║ ██║╚██████╔╝██║ ██║███████║ ██║ ██║██║ ██║██║ ╚████║██████╔╝███████╗███████╗██║ ██║
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝
```



# 📝 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:
```python
from logInfo import configLogs
```
2. Create a logger instance using the configure_logger function:
```python
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)
```
3. Use the logger to record messages based on the error level:
```python
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")
```
## :scroll: License
This repository is released under the [MIT License](LICENSE). Please see the `LICENSE` file for more information.
## :question: Support & Questions
If you have any questions or need support, please feel free to open an issue or join my twitter.
# :gem: Recommendations
Find more uncomplicated, GUI-free yet easy-to-use scripts here:
- [Tiny Scripts](https://github.com/SECRET-GUEST/tiny-scripts)