Metadata-Version: 2.4
Name: tracenest
Version: 0.1.1
Summary: Developer-first, local-first logging infrastructure for Python applications
Author-email: VishwajitVM <vishwajitmall50@gmail.com>
License: MIT License
        
        Copyright (c) 2026 VishwajitVM <vishwajitmall50@gmail.com>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/vishwajitvm/tracenest
Project-URL: Repository, https://github.com/vishwajitvm/tracenest
Project-URL: Issues, https://github.com/vishwajitvm/tracenest/issues
Keywords: logging,observability,logs,fastapi,developer-tools,local-first,infrastructure
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Logging
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == "fastapi"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: uvicorn[standard]; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Dynamic: license-file

# TraceNest

TraceNest is a **developer-first, local-first logging SDK for Python applications** designed to remove the operational burden of log management from developers.

You focus on building features.  
TraceNest takes care of logging.

---

## What is TraceNest?

TraceNest is not just a logger.  
It is a **logging infrastructure layer** embedded directly into your application.

It automatically:
- Creates and manages log files
- Rotates logs safely
- Enforces retention limits
- Provides a built-in UI to view logs
- Integrates seamlessly with FastAPI
- Works out of the box with zero configuration

---

## Why TraceNest Exists

Traditional logging requires developers to:
- Configure log handlers
- Manage file rotation
- Clean up old logs
- Build tools to inspect logs

TraceNest eliminates this complexity by handling **the entire log lifecycle automatically**.

---

## Key Features

- Zero-configuration setup
- Automatic `TraceNestLogs/` folder creation
- Day-wise or single-file logging modes
- Strict size and retention enforcement
- Built-in UI served from the application
- Structured, metadata-rich logs
- Native FastAPI middleware
- Safe, non-blocking design
- Free and easy to integrate

---

## Installation

```bash
pip install tracenest
```

---

## Quick Usage

```python
from tracenest import logger

logger.info("Application started")
logger.error("Payment failed", order_id=123)
```

Logs are immediately written to:

```text
TraceNestLogs/
```

No configuration required.

---

## Log Storage

By default, TraceNest stores logs locally inside the project root:

```text
TraceNestLogs/
├── 2026-01-10.log
├── 2026-01-11.log
└── archive/
```

### Default Behavior

- One log file per day
- Maximum 25–30 MB per day
- Retention up to 60 days
- Old logs deleted automatically

A single-file mode is also available for smaller projects.

---

## Built-In UI

When used with FastAPI, TraceNest exposes a local UI automatically:

```text
http://localhost:8000/tracenest
```

### UI Features

- Live log streaming
- Search and filtering
- Date-based navigation
- Download logs
- Clear logs
- Theme selection

### Available Themes

- Light
- Dark
- Blue-Dark

---

## FastAPI Integration

TraceNest provides native FastAPI middleware for automatic request logging.

```python
from tracenest.fastapi import TraceNestMiddleware

app.add_middleware(TraceNestMiddleware)
```

Automatically logs:
- Incoming requests
- Response status codes
- Request duration
- Unhandled exceptions

---

## Safety and Performance

TraceNest is designed to be production-safe.

- Never blocks application execution
- Uses buffered I/O
- Minimal memory footprint
- Graceful fallback on failure
- Works inside Docker and containers

TraceNest will **never crash your application**.

---

## Documentation

Detailed documentation is available in the `docs/` folder:

- Introduction & philosophy
- Quick start
- Logging guidelines
- Configuration
- Storage & retention
- UI usage
- FastAPI integration
- Performance guarantees
- Version history

---

## Versioning

TraceNest follows semantic versioning.

### Current Version: `0.1.0`

Includes:
- Core logging API
- Automatic folder creation
- Day-wise and single-file logging
- Retention enforcement
- Built-in UI
- FastAPI middleware

---

## Philosophy

TraceNest is built on three principles:

1. Zero friction for developers  
2. Full transparency of logs  
3. Production-grade safety by default  

---

## Author & Maintainer

**VishwajitVM**

- 📍 New Delhi, India  
- 🐙 GitHub: https://github.com/vishwajitvm  
- ✉️ Email: vishwajitmall50@gmail.com  

TraceNest is actively maintained with a strong focus on real-world production use cases, developer experience, and long-term scalability.

---

## License

TraceNest SDK is free to use and distributed under an open-source license.
