# **InsightLogger**
`InsightLogger` is an advanced, customizable logging library designed for Python applications. It helps developers track application performance, log detailed error messages, visualize data through charts, and create summaries of application execution.
## **Features**
- **Flexible Logging**: Supports multiple log levels (INFO, DEBUG, ERROR, etc.) with customizable formatting.
- **Rotating Logs**: Automatically manages log file size to prevent excessive disk usage.
- **Execution Time Tracking**: Decorate functions to measure and log execution time with live spinning animation.
- **Log Visualization**: Automatically generate bar graphs showing log level frequencies.
- **Environment Summary**: Generate detailed summaries of the runtime environment and execution statistics.
- **Enhanced Formatting**: Add styles like bold, underline, headers, and more to log messages.
---
## **Installation**
1. Clone the repository:
```bash
git clone https://github.com/VelisCore/InsightLogger.git
```
2. Install required dependencies:
```bash
pip install -r requirements.txt
```
Dependencies include:
- `termcolor`
- `matplotlib`
- `tabulate`
- `psutil`
---
## **Usage**
### **Getting Started**
```python
from insightlog import InsightLogger
# Initialize the logger
logger = InsightLogger(name="AppLog")
@logger.log_function_time
def example_function():
time.sleep(2)
# Logging
logger.log_types("INFO", "This is an info log.")
logger.log_types("ERROR", "An error occurred.")
# Visualize logs and generate a summary
logger.draw_and_save_graph()
summary = logger.generate_log_summary()
logger.logger.info("\nSummary of Logs:\n" + summary)
```
### **Decorators**
Measure execution time for any function:
```python
@logger.log_function_time
def sample_function():
time.sleep(1.5)
```
### **Log Levels**
Supported log levels include:
- `INFO`
- `ERROR`
- `SUCCESS`
- `FAILURE`
- `WARNING`
- `DEBUG`
- `ALERT`
- `TRACE`
- `HIGHLIGHT`
- `CRITICAL`
### **Environment Summary**
`InsightLogger` automatically collects environment information, such as:
- Python version
- Operating system and version
- Machine specifications (CPU, memory, etc.)
- Execution start and end times
---
## **Example Output**
### Console Output
```
[INFO] This is an info log.
[ERROR] An error occurred.
Function 'example_function' executed in 1500.12 ms.
```
### Summary Table
| Environment Info | Details |
|------------------------|-------------------------|
| Python Version | 3.10 |
| Operating System | Windows |
| Memory | 16.00 GB |
| Total Errors | 1 |
### Log Frequency Graph

---
## **Contribution**
We welcome contributions to `InsightLogger`. To contribute:
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Submit a pull request with detailed descriptions of changes.
---
## **License**
`InsightLogger` is licensed under the MIT License. See `LICENSE` for details.
---
## **Support**
For issues or feature requests, please [open an issue](https://github.com/VelisCore/InsightLogger/issues).
---
## **Author**
Developed by **VelisCore**.
Raw data
{
"_id": null,
"home_page": "https://github.com/VelisCore/InsightLogger",
"name": "InsightLogger",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "logging, log, logger, developer tools, performance monitoring, visualization",
"author": "VelisCore",
"author_email": "velis.help@web.de",
"download_url": "https://files.pythonhosted.org/packages/41/94/748ec955f1bc325ee3fe876c1ba766fa2e4bc9e5caa50ad52e0f559401d6/insightlogger-1.2.3.tar.gz",
"platform": null,
"description": "# **InsightLogger**\n\n`InsightLogger` is an advanced, customizable logging library designed for Python applications. It helps developers track application performance, log detailed error messages, visualize data through charts, and create summaries of application execution.\n\n## **Features**\n\n- **Flexible Logging**: Supports multiple log levels (INFO, DEBUG, ERROR, etc.) with customizable formatting.\n- **Rotating Logs**: Automatically manages log file size to prevent excessive disk usage.\n- **Execution Time Tracking**: Decorate functions to measure and log execution time with live spinning animation.\n- **Log Visualization**: Automatically generate bar graphs showing log level frequencies.\n- **Environment Summary**: Generate detailed summaries of the runtime environment and execution statistics.\n- **Enhanced Formatting**: Add styles like bold, underline, headers, and more to log messages.\n\n---\n\n## **Installation**\n\n1. Clone the repository:\n\n ```bash\n git clone https://github.com/VelisCore/InsightLogger.git\n ```\n\n2. Install required dependencies:\n\n ```bash\n pip install -r requirements.txt\n ```\n\n Dependencies include:\n - `termcolor`\n - `matplotlib`\n - `tabulate`\n - `psutil`\n\n---\n\n## **Usage**\n\n### **Getting Started**\n\n```python\nfrom insightlog import InsightLogger\n\n# Initialize the logger\nlogger = InsightLogger(name=\"AppLog\")\n\n@logger.log_function_time\ndef example_function():\n time.sleep(2)\n\n# Logging\nlogger.log_types(\"INFO\", \"This is an info log.\")\nlogger.log_types(\"ERROR\", \"An error occurred.\")\n\n# Visualize logs and generate a summary\nlogger.draw_and_save_graph()\nsummary = logger.generate_log_summary()\nlogger.logger.info(\"\\nSummary of Logs:\\n\" + summary)\n```\n\n### **Decorators**\n\nMeasure execution time for any function:\n\n```python\n@logger.log_function_time\ndef sample_function():\n time.sleep(1.5)\n```\n\n### **Log Levels**\n\nSupported log levels include:\n- `INFO`\n- `ERROR`\n- `SUCCESS`\n- `FAILURE`\n- `WARNING`\n- `DEBUG`\n- `ALERT`\n- `TRACE`\n- `HIGHLIGHT`\n- `CRITICAL`\n\n### **Environment Summary**\n\n`InsightLogger` automatically collects environment information, such as:\n- Python version\n- Operating system and version\n- Machine specifications (CPU, memory, etc.)\n- Execution start and end times\n\n---\n\n## **Example Output**\n\n### Console Output\n\n```\n[INFO] This is an info log.\n[ERROR] An error occurred.\nFunction 'example_function' executed in 1500.12 ms.\n```\n\n### Summary Table\n\n| Environment Info | Details |\n|------------------------|-------------------------|\n| Python Version | 3.10 |\n| Operating System | Windows |\n| Memory | 16.00 GB |\n| Total Errors | 1 |\n\n### Log Frequency Graph\n\n\n\n---\n\n## **Contribution**\n\nWe welcome contributions to `InsightLogger`. To contribute:\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Submit a pull request with detailed descriptions of changes.\n\n---\n\n## **License**\n\n`InsightLogger` is licensed under the MIT License. See `LICENSE` for details.\n\n---\n\n## **Support**\n\nFor issues or feature requests, please [open an issue](https://github.com/VelisCore/InsightLogger/issues).\n\n---\n\n## **Author**\n\nDeveloped by **VelisCore**.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A customizable logging utility with enhanced features for developers.",
"version": "1.2.3",
"project_urls": {
"Bug Tracker": "https://github.com/VelisCore/InsightLogger/issues",
"Documentation": "https://github.com/VelisCore/InsightLogger/wiki",
"Download": "https://github.com/VelisCore/InsightLogger/archive/refs/tags/v1.2.3.tar.gz",
"Homepage": "https://github.com/VelisCore/InsightLogger",
"Source Code": "https://github.com/VelisCore/InsightLogger"
},
"split_keywords": [
"logging",
" log",
" logger",
" developer tools",
" performance monitoring",
" visualization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5110f2fc428e9c72a09ff6ddec289e9ff9bfcce07a712d2d3b52b20329065c8f",
"md5": "f8be2c8e2fc9b0bdd76db9330152ecce",
"sha256": "a166771dd0a075d4ca68f3b77350e95a10c136243cda539222e88d7b0021bdfe"
},
"downloads": -1,
"filename": "InsightLogger-1.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f8be2c8e2fc9b0bdd76db9330152ecce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6941,
"upload_time": "2024-12-26T14:33:53",
"upload_time_iso_8601": "2024-12-26T14:33:53.671574Z",
"url": "https://files.pythonhosted.org/packages/51/10/f2fc428e9c72a09ff6ddec289e9ff9bfcce07a712d2d3b52b20329065c8f/InsightLogger-1.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4194748ec955f1bc325ee3fe876c1ba766fa2e4bc9e5caa50ad52e0f559401d6",
"md5": "921c14334bbd2245356407cbe22d10c4",
"sha256": "ba06dff94d4147fd9c8b80e932f9625d59b3feab09ad9f9f3fd1b99280a9c8b7"
},
"downloads": -1,
"filename": "insightlogger-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "921c14334bbd2245356407cbe22d10c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 6534,
"upload_time": "2024-12-26T14:33:54",
"upload_time_iso_8601": "2024-12-26T14:33:54.709974Z",
"url": "https://files.pythonhosted.org/packages/41/94/748ec955f1bc325ee3fe876c1ba766fa2e4bc9e5caa50ad52e0f559401d6/insightlogger-1.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-26 14:33:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "VelisCore",
"github_project": "InsightLogger",
"github_not_found": true,
"lcname": "insightlogger"
}