Metadata-Version: 2.1
Name: visionlog
Version: 0.1.1
Summary: A universal structured logging library for analytics tracking
Home-page: https://github.com/szmyty/visionlog
License: MIT
Author: Alan Szmyt
Author-email: szmyty@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: device-detector (>=5.0.1,<6.0.0)
Requires-Dist: loguru (>=0.7.0,<0.8.0)
Requires-Dist: opentelemetry-api (>=1.15.0,<2.0.0)
Requires-Dist: opentelemetry-sdk (>=1.15.0,<2.0.0)
Requires-Dist: orjson (>=3.8.1,<4.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: structlog (>=23.1.0,<24.0.0)
Project-URL: Documentation, https://github.com/szmyty/visionlog#readme
Project-URL: Repository, https://github.com/szmyty/visionlog
Description-Content-Type: text/markdown

# Visionlog 🚀

A high-performance, structured logging library for analytics tracking.

## Features

- 🚀 **Structured JSON Logging**
- 🔎 **Easy Integration with OpenTelemetry**
- 🎨 **Pretty Console Output with Loguru**
- ⚡ **Ultra-Fast JSON Serialization using orjson**
- 🛠 **Command-Line Logging Tool**

## Installation

### **Install via pip**

```sh
pip install visionlog
```

### **Install via Poetry**

```sh
poetry add visionlog
```

---

## 🚀 **Usage**

### **1. Basic Example**

```python
from visionlog import get_logger

logger = get_logger("my-app")

logger.info("User login event", user="john_doe", action="login")
logger.warning("Suspicious activity detected", ip="192.168.1.1")
logger.error("Server crashed!", error_code=500)
```

### **2. CLI Usage**

You can also log messages directly from the command line:

```sh
visionlog-cli --message "Quick log example"
```

---

## 🎯 **Advanced Usage**

### **Using Visionlog with OpenTelemetry**

```python
from visionlog import get_logger
from opentelemetry import trace

tracer = trace.get_tracer("visionlog-tracer")
logger = get_logger("my-app")

with tracer.start_as_current_span("http_request"):
    logger.info("Tracking request event", endpoint="/api/data", status=200)
```

---

## ⚡ **Why Use Visionlog?**

✅ **Super fast JSON serialization** using `orjson`  
✅ **Structured, formatted logs** for analytics  
✅ **Extensible** with OpenTelemetry for tracing  
✅ **Command-line logging** for quick debugging  

---

## 🛠 **Development & Contribution**

1. Clone the repository:

   ```sh
   git clone https://github.com/szmyty/visionlog.git
   cd visionlog
   ```

2. Install dependencies:

   ```sh
   poetry install
   ```

3. Run the example:

   ```sh
   python examples/basic_usage.py
   ```

---

## 📜 **License**

Visionlog is released under the **MIT License**.

