InsightLog


NameInsightLog JSON
Version 1.2.3 PyPI version JSON
download
home_pagehttps://github.com/VelisCore/InsightLogger
SummaryA customizable logging utility with enhanced features for developers.
upload_time2024-12-27 12:50:37
maintainerNone
docs_urlNone
authorVelisCore
requires_python>=3.9
licenseMIT
keywords logging log logger developer tools performance monitoring visualization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # **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

![Log Frequency](.Insight/2023-12-01/log_frequency.png)

---

## **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": "InsightLog",
    "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/4a/3f/c60c395431268f867a363c50ff157aa06f50843e0c580b4321e126c80e6f/insightlog-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![Log Frequency](.Insight/2023-12-01/log_frequency.png)\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/InsightLog/issues",
        "Documentation": "https://github.com/VelisCore/InsightLog/wiki",
        "Download": "https://github.com/VelisCore/InsightLog/archive/refs/tags/v1.2.3.tar.gz",
        "Homepage": "https://github.com/VelisCore/InsightLogger",
        "Source Code": "https://github.com/VelisCore/InsightLog"
    },
    "split_keywords": [
        "logging",
        " log",
        " logger",
        " developer tools",
        " performance monitoring",
        " visualization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8459d8f87e5c4c5f7f18a586f4dbe573580145d4b0b39369d50fa17be92cd516",
                "md5": "477435ebd804b224ee92e91a5e50d6e1",
                "sha256": "ed89e52198a4d8087ab121a68ff27cc7d426d482b06b4cedbcdd52406d2065b1"
            },
            "downloads": -1,
            "filename": "InsightLog-1.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "477435ebd804b224ee92e91a5e50d6e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6913,
            "upload_time": "2024-12-27T12:50:33",
            "upload_time_iso_8601": "2024-12-27T12:50:33.952886Z",
            "url": "https://files.pythonhosted.org/packages/84/59/d8f87e5c4c5f7f18a586f4dbe573580145d4b0b39369d50fa17be92cd516/InsightLog-1.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a3fc60c395431268f867a363c50ff157aa06f50843e0c580b4321e126c80e6f",
                "md5": "5c45121b11706ac04f0e7225ea236106",
                "sha256": "876cd6d1a147429e4bb215ebe2382d017d9bd3e479bb2450e4c917cc1408a6ea"
            },
            "downloads": -1,
            "filename": "insightlog-1.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5c45121b11706ac04f0e7225ea236106",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6554,
            "upload_time": "2024-12-27T12:50:37",
            "upload_time_iso_8601": "2024-12-27T12:50:37.319328Z",
            "url": "https://files.pythonhosted.org/packages/4a/3f/c60c395431268f867a363c50ff157aa06f50843e0c580b4321e126c80e6f/insightlog-1.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-27 12:50:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VelisCore",
    "github_project": "InsightLogger",
    "github_not_found": true,
    "lcname": "insightlog"
}
        
Elapsed time: 4.33564s