semvec/pypi-packages huggingface dataset:
logger-web 0.1.0
A Python logging package with a modern web interface for viewing logs
License: MIT
Requires Python: >=3.8
Keywords: logging, web, interface, json, monitoring

# logger-web

A Python logging package with a modern web interface for viewing logs. This package provides structured JSON logging with the ability to view logs through a beautiful web interface.

## Features

- Structured JSON logging with customizable categories
- Support for custom log levels
- Modern web interface for log viewing and filtering
- Easy to integrate into any Python project

## Installation

```bash
pip install logger-web
```

## Quick Start

```python
from logger_web import LoggerManager

# Create a logger manager
manager = LoggerManager(log_dir="logs")

# Get a logger for your application
logger = manager.get_logger("app")

# Log some messages
logger.info("Application started")
logger.warning("Resource usage is high", extra={"cpu": 85, "memory": 90})

# Log an error with exception info
try:
    1/0
except Exception as e:
    logger.error("An error occurred", exc_info=True)
```

## Advanced Usage

### Custom Log Levels

```python
# Add a custom log level
manager.add_custom_level("TRACE", 5, category="app")
logger.trace("This is a trace message")
```

### Multiple Categories

```python
# Get loggers for different categories
app_logger = manager.get_logger("app")
db_logger = manager.get_logger("database")

app_logger.info("Application started")
db_logger.debug("Executing database query")
```

## Development

This project is under active development. The current version is 0.1.0.

### Project Structure

```
logger-web/
├── logger_web/
│   ├── __init__.py
│   ├── manager.py
│   └── web_templates/
├── examples/
│   └── basic_usage.py
└── tests/
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.