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.0.tar.gz (5.7 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.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neolog-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 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.0.tar.gz
Algorithm Hash digest
SHA256 34f0a57da61aee0ecbf96f63c87724bd1cd0234d5cd9aec108c2a791ce45ce49
MD5 7f44f2a3eadb85427ff50fe1072e3bde
BLAKE2b-256 6fcdf7d66bb56d883896e0db15ca5cc643f4fb14fbc5c0381387603534d655e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: neolog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b10fcb188f42b707ece9ad840828bc7e7900e825772ef013c1a2cc8610fb93f
MD5 da99b6ac8faa5ef84a4901f6a641f823
BLAKE2b-256 9398dbc0db2181c8ac9614d7f07673f1ea6e49b9d8929702a3117529094ed6d6

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