Skip to main content

A comprehensive logging library for Python applications with minimal code changes

Project description

LogEverything

High-performance Python logging with zero configuration.

PyPI Python Build Coverage License Downloads Code Size Last Commit Issues Stars

Add decorators to your functions for automatic, comprehensive logging. LogEverything captures inputs, outputs, execution times, and call hierarchy with thread safety, async isolation, and beautiful formatting out of the box.

10k ops/sec

Core Logging Throughput

<0.5ms

Decorator Overhead

7.9k ops/sec

Print Capture

395 tests

65% coverage

Why LogEverything?

Most Python logging libraries make you choose: simple but limited (logging), fast but opinionated (loguru), or structured but complex (structlog). LogEverything combines decorator-based function tracing, native async support, structured JSON output, file rotation, and a companion monitoring dashboard all with zero-config defaults and production-grade performance.

Feature logging loguru structlog LogEverything
Zero-config decorators :white_check_mark:
Hierarchical call tracing :white_check_mark:
Async-native with task isolation :white_check_mark: :white_check_mark:
Structured JSON output :white_check_mark: :white_check_mark: :white_check_mark:
File rotation + gzip compression :white_check_mark: :white_check_mark: :white_check_mark:
Print capture (stdout redirect) :white_check_mark:
Monitoring dashboard :white_check_mark:
Configuration profiles :white_check_mark:

Install

pip install logeverything

Quick Start

Logger

from logeverything import Logger

log = Logger("my_app")
log.info("Application started")
log.warning("Disk usage high")
log.error("Connection failed")

Decorators

from logeverything import Logger
from logeverything.decorators import log

app_log = Logger("my_app")

@log                          # auto-detect context
def process(items):
    return sum(items)

@log(using="my_app")          # target a specific logger
def validate(data):
    return len(data) > 0

process([1, 2, 3])
validate("hello")

Output:

-> process(items=[1, 2, 3]) [app.py:7]
<- process (0.03ms) -> 6
-> validate(data='hello') [app.py:11]
<- validate (0.01ms) -> True

Hierarchical Call Tracing

from logeverything.decorators import log_function

@log_function
def main():
    step1()

@log_function
def step1():
    step2()

@log_function
def step2():
    print("Processing...")

main()
-> main() [app.py:3]
|   -> step1() [app.py:7]
|   |   -> step2() [app.py:11]
|   |   |   Processing...
|   |   <- step2 (0.12ms)
|   <- step1 (0.45ms)
<- main (1.02ms)

Async

from logeverything import AsyncLogger
import asyncio

log = AsyncLogger("worker")

async def fetch(url):
    log.info(f"GET {url}")
    await asyncio.sleep(0.1)
    log.info("Done")

asyncio.run(fetch("https://api.example.com"))

Profiles

from logeverything import Logger

log = Logger("my_app")
log.configure(profile="production")    # minimal overhead, structured output
log.configure(profile="development")   # rich colors and visual hierarchy
log.configure(profile="api")           # optimized for web services

CLI Tool

$ logeverything version
logeverything 0.1.0
Python 3.11.9
Platform: Windows-10-10.0.26100-SP0

$ logeverything doctor
logeverything doctor
  [] Python 3.11.9
  [] psutil 5.9.5
  [] celery (not installed)
  [] py.typed marker present
  [] Dashboard at localhost:8999 (not reachable)

$ logeverything init
Select environment type:
  1) web   2) script   3) notebook
 Creates logging_config.py with sensible defaults

Also available as python -m logeverything.

File Rotation

from logeverything.handlers import TimedRotatingFileHandler

handler = TimedRotatingFileHandler(
    "logs/app.log",
    when="midnight",       # rotate daily at midnight
    retention_days=30,     # keep 30 days of logs
    compress=True,         # gzip old files
)

Size-based rotation with compression is also supported via FileHandler:

from logeverything.handlers import FileHandler

handler = FileHandler(
    "logs/app.log",
    max_size=10_485_760,   # 10 MB
    backup_count=5,
    compress=True,         # gzip rotated files
)

For dashboard-compatible structured output, attach JSONLineFormatter to any handler:

from logeverything.handlers import FileHandler, JSONLineFormatter

handler = FileHandler("logs/app.jsonl", max_size=10_485_760, backup_count=5)
handler.setFormatter(JSONLineFormatter(source="my_service"))

Architecture

graph TD
    A["Your Code"] -->|"@log decorator"| B["Decorators"]
    B --> C["Logger / AsyncLogger"]
    C --> D["ConsoleHandler"]
    C --> E["FileHandler + Rotation"]
    C --> F["JSONHandler"]
    C --> G["HTTP / TCP / UDP Transport"]
    G --> H["Dashboard"]
    E -->|"JSONL files"| H

Features

Core

  • Unified @log decorator functions, classes, async
  • Smart logger selection with using parameter
  • Auto-discovery and registration of logger instances
  • Structured binding: log.bind(user_id=123)
  • Context managers: log.verbose(), log.quiet()

Performance & Safety

  • 10k ops/sec core logging, 7.9k ops/sec print capture
  • Async-native with 454 ops/sec task-isolated logging
  • Zero overhead when logging is disabled
  • Automatic thread-safe context isolation
  • 395 tests, 65% coverage
  • Cross-platform (Windows, macOS, Linux)

Output

  • Console, file, JSON, and JSONL (JSONLineFormatter) handlers
  • Time-based and size-based file rotation with gzip
  • Color themes with Unicode symbols
  • Hierarchical indentation and aligned columns
  • Automatic UTF-8 encoding on Windows
  • 7.9k ops/sec capture_print() for stdout

Integrations

  • ASGI/WSGI middleware (FastAPI, Flask, Django)
  • Celery task logging with correlation propagation
  • Correlation IDs across requests and threads
  • Log transports: HTTP, TCP, UDP
  • CLI tool (logeverything doctor, init)
  • Monitoring API with WebSocket streaming

Monitoring Dashboard

A companion web dashboard for exploring logs, operations, and system metrics in real time. The dashboard is not included in the base pip install logeverything install it separately using one of the methods below.

Dashboard

Install from PyPI

pip install logeverything-dashboard

# Start the dashboard
logeverything-dashboard                     # http://localhost:3001

# Point it at your log directory
logeverything-dashboard --data-dir ./logs

# Or connect to a remote LogEverything API
logeverything-dashboard --api-url http://localhost:8080/api/v1

Install from Source

If you cloned the LogEverything repo, the dashboard is included in the logeverything-dashboard/ directory:

cd logeverything-dashboard
pip install -r requirements.txt

# (Optional) Copy and edit the config file
cp config/settings.example.yaml config/settings.yaml

# Start the dashboard
python run_dashboard.py          # http://localhost:3001

Pages

  • Overview summary cards, CPU/memory trends, log distribution, operation analytics
  • Logs filterable table with multi-select level pills, pagination, flat + tree view
  • Operations analytics with failure rates and duration tracking
  • System detailed process/resource metrics, session info

Capabilities

  • Hierarchical tree view with expand/collapse and duration badges
  • Time-range filtering (1h / 6h / 24h / 7d)
  • Full-text log search and correlation ID tracing
  • Dark and light themes
  • Keyboard shortcuts, auto-refresh, JSON export
  • Real-time updates via WebSocket

Dashboard Guide full documentation with screenshots, API endpoints, and customisation.


Documentation

Installation Setup and optional extras
Quick Start First steps with LogEverything
User Guide Logger classes, decorators, profiles, handlers, async, integrations
Dashboard Monitoring dashboard setup and usage
API Reference Complete module and class reference
Advanced Performance tuning and production deployment

Contributing

Contributions welcome. See the Contributing Guide.

pip install -e ".[dev]"
logeverything doctor   # check environment and optional deps
make test              # run tests with coverage
make lint              # flake8, black, isort, mypy, bandit
make format            # auto-format

License

MIT License. See LICENSE for details.

Built for developers who believe every function call tells a story.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logeverything-0.0.1.tar.gz (388.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logeverything-0.0.1-py3-none-any.whl (379.3 kB view details)

Uploaded Python 3

File details

Details for the file logeverything-0.0.1.tar.gz.

File metadata

  • Download URL: logeverything-0.0.1.tar.gz
  • Upload date:
  • Size: 388.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for logeverything-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b84c63a2e8a36fcd37460dc5113d6149ef83110c1906e4904e43420830f86259
MD5 1658705f23bb2c799b2e40612c2fef3c
BLAKE2b-256 bcea4a56b1e2389f11448f17a18bf33a827af58c7e99cf6eba4875fa6b13a3e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for logeverything-0.0.1.tar.gz:

Publisher: release.yml on RamishSiddiqui/logeverything

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file logeverything-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: logeverything-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 379.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for logeverything-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 646a777d29b398fa5b4d5472bd6576f0981b3dee8ad44707936eba0bc747589b
MD5 5c889149d6c01ba624b305c7fe5a4011
BLAKE2b-256 0e6a36bf7d8605f62a850c221f91a632dd1638aa429d4a33523520ecddbcdec5

See more details on using hashes here.

Provenance

The following attestation bundles were made for logeverything-0.0.1-py3-none-any.whl:

Publisher: release.yml on RamishSiddiqui/logeverything

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page