Skip to main content

NeoLog

Real-time structured log viewer and system monitor for developers.

neolog is a terminal UI (TUI) that tails any JSON log file and gives you live dashboards, trace drill-down, level filtering, system metrics, and one-key log export — all in your terminal.


Install

pip install neolog

Or install from source:

git clone https://github.com/GauravPandit27/TUI-logs
cd TUI-logs
pip install -e .

Usage

View a log file

neolog app.log
neolog /var/log/myapp.log --max-lines 5000

Use the structured logger in your app

from neolog import get_logger, trace, set_trace_id

logger = get_logger("myapp", log_file="app.log", level="DEBUG")

logger.info("Server started", extra={"port": 8080})
logger.warning("High memory", extra={"usage_mb": 1200})

@trace(log_args=True, log_result=True)
def process_order(order_id: str):
    logger.info("Processing order", extra={"order_id": order_id})
    ...

Each request gets its own trace ID automatically:

from neolog import set_trace_id

def handle_request():
    trace_id = set_trace_id()  # auto UUID4
    logger.info("Request started", extra={"route": "/api/users"})
    ...

All errors tied to the same trace_id appear together in the Error Traces panel — one click drills down to that request's full log chain.


Screens & Key Bindings

📊 Main Dashboard (health)

Key Action
1 Show all log levels
2 Debug and above
3 Info and above
4 Warn and above
5 Error only
p Pause / resume live stream
f or / Focus search bar
r Reset all filters
x Export filtered logs to JSON
m Open System Metrics screen
q Quit

Search syntax:

  • timeout — full-text match anywhere in the log line
  • user_id:42 — field-value match (key:value)

Click any error trace in the sidebar to drill down.

🔍 Tracer Screen

Opened when you click an error trace. Shows all logs tied to that trace_id.

Key Action
Escape / b Back to dashboard
f or / Search
r Reset filters
c Clear view

🖥️ System Metrics Screen

Opened with m from the dashboard. Updates every second.

  • CPU — overall % + sparkline + per-core bars
  • Memory — RAM used/total + swap with colour-coded bars
  • Disk — all mounted partitions with usage bars
  • Network — upload/download rates with sparklines, cumulative totals
  • Top Processes — sorted by CPU, shows PID, name, CPU%, RAM, threads, status

Log Format

NeoLog works with any newline-delimited JSON log. The get_logger() utility produces compatible output, but you can point it at any structured log file:

{"level": "INFO", "timestamp": "2026-08-12T12:00:00+00:00", "message": "User logged in", "user_id": 42}
{"level": "ERROR", "timestamp": "2026-08-12T12:00:01+00:00", "message": "DB timeout", "trace_id": "abc-123"}

Non-JSON lines are shown as plain dimmed text — no crashes.


@trace Decorator

Wraps any function to automatically log entry, exit, execution time, and exceptions:

from neolog import trace

@trace(log_args=True, log_result=False)
def fetch_user(user_id: int) -> dict:
    ...  # automatically logged with execution_time_sec

Output:

{"level": "DEBUG", "message": "Entering fetch_user", "function": "fetch_user", "func_args": ["42"]}
{"level": "DEBUG", "message": "Exiting fetch_user",  "function": "fetch_user", "execution_time_sec": 0.234}

Publishing to PyPI

pip install build twine

# Build
python -m build

# Upload to TestPyPI first
twine upload --repository testpypi dist/*

# Upload to PyPI
twine upload dist/*

Requirements

  • Python 3.10+
  • textual >= 0.82.0
  • rich >= 13.7.1
  • psutil >= 5.9.0

License

MIT

Download files

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

Source Distribution

neolog-0.1.1.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

neolog-0.1.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file neolog-0.1.1.tar.gz.

File metadata

  • Download URL: neolog-0.1.1.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for neolog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 504741eab312cb6468ea3ff2ac97517dc5af14d114182af0e8f732f9fb6c2264
MD5 03554233e25b914e812d80a032018150
BLAKE2b-256 1bb40282cd70122dcc7afca8274ce037ef5a75d97d59c72152f680c70b5415bf

See more details on using hashes here.

File details

Details for the file neolog-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: neolog-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for neolog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bddc262104ac0d6b8d7d8f9e12b972caaa19f0744374ff9642bdbfef484bf446
MD5 43b45741ae570ed2ec6e58b12a107db5
BLAKE2b-256 0f770bcde99f23b8c32408d0729da4753f6e1f69d3f6314ac0615b0287dc4630

See more details on using hashes here.

Supported by

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