Skip to main content

lightlogger

Live web dashboard for your Python logs — pip install, add one line, open localhost:4356. Zero dependencies.

PyPI CI License: MIT Python 3.9+

lightlogger dashboard: a nested process_order group with a warning badge, a live error, and streaming request logs

Install

pip install lightlogger
import lightlogger
lightlogger.start()
lightlogger.info("user logged in")

That's it — open http://127.0.0.1:4356 and watch it stream in live, in a dark, searchable dashboard. No config file, no separate server process to run, no npm install.

Your existing logging calls show up too, with zero code changes:

lightlogger.start(capture_logging=True)  # the default
import logging
logging.getLogger("some.third.party.lib").warning("disk almost full")  # appears in the UI automatically

And when one log message is really four related operations, group them:

with lightlogger.group("process_order #4821"):
    lightlogger.info("validating cart")
    lightlogger.info("charging payment", data={"amount": 49.99})
    with lightlogger.group("send_notifications"):
        lightlogger.info("email sent")
        lightlogger.info("sms sent")

They render as a collapsible tree — click to expand, nested groups indent, a red badge appears if anything inside failed.

Features

Live streaming Server-Sent Events, not polling — logs appear the instant they're written
Zero-code logging capture Attaches to the root logger; your own and third-party libraries' logs show up automatically
Nested log grouping with lightlogger.group(name): — collapsible, nested, thread- and async-safe
Search & level filter Client-side, instant, works across grouped and ungrouped logs alike
Pause / Resume Freeze the view to read something — nothing is dropped, a counter shows what's waiting
Click to expand File, line, logger name, and pretty-printed JSON data for any entry
Download as JSON One click, the full current backlog
Bounded memory A fixed-size ring buffer — lightlogger can never be the reason your app runs out of RAM
Zero dependencies Python standard library only, from the HTTP server to the JSON encoding

API reference

Function Description Example
start(...) Starts the dashboard on a background thread. See parameters below. Calling it again while already running is a no-op. lightlogger.start(port=8080, open_browser=True)
stop() Stops the server and detaches the logging handler. Mostly for tests/notebooks. lightlogger.stop()
debug(msg, data=None) Logs a debug-level message (grey). lightlogger.debug("cache miss", data={"key": "user:42"})
info(msg, data=None) Logs an info-level message (blue). lightlogger.info("user logged in")
warn(msg, data=None) Logs a warn-level message (yellow). lightlogger.warn("retrying after timeout")
error(msg, data=None) Logs an error-level message (red). lightlogger.error("payment failed", data={"order_id": 123})
var(name, value) Logs any variable as an expandable JSON blob. lightlogger.var("cart", cart_dict)
request(method, url, status, duration_ms) Logs one HTTP request/response. Level follows the status code: < 400 → info, 4xx → warn, 5xx → error. lightlogger.request("GET", "/api/users", 500, 812.0) → logs as error
group(name) Context manager for nested, collapsible log groups. Thread- and async-safe. with lightlogger.group("checkout"): ...
help() Prints this reference to your terminal. lightlogger.help()

start() parameters:

Parameter Default Meaning
port 4356 Preferred port; auto-increments to the next free one if taken
host "127.0.0.1" Bind address — "0.0.0.0" is an explicit, loudly-warned opt-in for LAN exposure
max_logs 5000 Ring buffer size — the most recent N records are kept, oldest dropped first
capture_logging True Attach a handler to the root logger so existing logging calls appear automatically
open_browser False Open the dashboard in your default browser as soon as it's live

Built-in help

Forgot the API? It's in the package, not just this README:

>>> import lightlogger
>>> lightlogger.help()

Prints a full cheatsheet to your terminal — every function, one-line descriptions, tiny examples, the capture_logging gotcha, no need to leave your shell. And once the dashboard is running, open http://127.0.0.1:4356/help for the same reference as a page, with copyable code blocks.

Why lightlogger

Debugging a running Python process usually means one of three things: print() statements you'll forget to remove, a terminal window full of scrolling text you can't search, or reaching for a heavyweight observability platform to answer a question that takes ten seconds to answer once you can actually see your logs.

We looked at what else exists. Logdy is a Go binary you install separately from your app. Chronologer needs its own server process. cutelog needs PyQt. Logfire is closed-source and cloud-hosted. lnav and klp are terminal-only. Django and Flask debug toolbars only work inside those specific frameworks, in that specific request/response cycle.

None of them do the one thing that actually matches how a Python developer debugs: import, call one function, and get a live web page — from inside the process you're already running, with no extra install, no extra service, no dependencies to audit. That's the gap lightlogger fills. And once your logs have a real UI instead of a scrolling terminal, grouping related operations into a collapsible tree stops being a nice-to-have — it's the difference between reading a wall of text and reading a story.

Security

lightlogger binds to 127.0.0.1 only, by default — nothing is reachable outside your machine unless you explicitly pass host="0.0.0.0" (which prints a loud warning when you do). It's a local development tool, not a production observability system: don't run it against a public-facing process, and don't leave it running longer than your debugging session needs.

Contributing

Contributions are welcome — see CONTRIBUTING.md for the ground rules (short version: zero dependencies, stay on stdlib, keep it simple). Bug reports and PRs both go through GitHub Issues.

License

MIT — see LICENSE.

Metadata

Release files for lightlogger 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightlogger 0.1.1
File Size Uploaded Provenance Actions
lightlogger-0.1.1.tar.gz 307.2 kB With provenance Details for lightlogger-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lightlogger 0.1.1
File Interpreter ABI Platform Actions
lightlogger-0.1.1-py3-none-any.whl Python 3 none any Details for lightlogger-0.1.1-py3-none-any.whl

Total release size: 333.1 kB

Release files / lightlogger-0.1.1.tar.gz

Download URL lightlogger-0.1.1.tar.gz
Size 307.2 kB
Tags Source
SHA-256 checksum
How to use checksums
004678ae66fac8e157cd5817527e815ffee15a2e50361daf899a5375070f6786
BLAKE2b-256 checksum
How to use checksums
fdeff1ea7557072196e0b5ea852ec9c1fa8b30a433d6945c7391687cf78bed7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / lightlogger-0.1.1-py3-none-any.whl

Download URL lightlogger-0.1.1-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94fc1a33df944bb0b7d9ae04a6ed884ed166346027e9b7aec166d096165081e3
BLAKE2b-256 checksum
How to use checksums
7ca49dd0bef50a116da53614e8636badb9d794f6a7001e8253bad7df00e06ba6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Security for lightlogger 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lightlogger-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page