Metadata-Version: 2.2
Name: InsightLog
Version: 1.2.4
Summary: A customizable logging utility with enhanced features for developers.
Home-page: https://github.com/VelisCore/InsightLogger
Download-URL: https://github.com/VelisCore/InsightLog/archive/refs/tags/v1.2.4.tar.gz
Author: VelisCore
Author-email: velis.help@web.de
License: MIT
Project-URL: Bug Tracker, https://github.com/VelisCore/InsightLog/issues
Project-URL: Documentation, https://github.com/VelisCore/InsightLog/wiki
Project-URL: Source Code, https://github.com/VelisCore/InsightLog
Keywords: logging,log,logger,developer tools,performance monitoring,visualization
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Libraries
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: termcolor
Requires-Dist: matplotlib
Requires-Dist: tabulate
Requires-Dist: psutil
Requires-Dist: tqdm
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# **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**.
