qmetrics.net

Loguru

Ready-to-use structured logging for Python programs

Loguru screenshot

Loguru is a Python package that replaces most stdlib logging setup with a single import and configurable sinks for stderr, files, or custom handlers.

Overview

Loguru centers on one preconfigured logger object so scripts can start emitting leveled messages immediately, usually to stderr, without defining formatters or handlers up front. The add() method registers sinks such as functions, file paths, or streaming objects, while remove() clears defaults when you want a clean slate.

File sinks support rotation, retention policies, and compression. Messages use brace-style formatting, optional JSON serialization, and contextual bind() or patch() data for structured fields. A catch() helper routes uncaught exceptions—including in threads—to the logger with expanded tracebacks.

Sinks are thread-safe by default and can enqueue records for multiprocess or asynchronous use. Libraries are expected to call disable() rather than add() so host apps control output, while configure() suits applications. The package interoperates with the standard logging module in both directions.

Environment variables can adjust defaults such as level and color behavior, and optional companion packages integrate configuration files or notification services.

Key features

  • Single import with preconfigured logger
  • add() and remove() sink management
  • File rotation, retention, compression
  • JSON serialization and context binding
  • Colored terminal output when supported
  • Exception catcher with rich tracebacks
  • Thread-safe and enqueueable sinks
  • Standard logging interoperability

Use cases

  • Quick logging in Python scripts
  • Rotating local log files with compression
  • Structured JSON logs for parsing pipelines
  • Library code that stays quiet until enabled

Tags

Similar software

Uptime Kuma

Self-hosted uptime monitoring with status pages and alerts

Uptime Kuma is a self-hosted monitoring tool for checking whether services stay online. It covers many probe types and can notify you through numerous messaging and email channels.

★ 95k⟳ yesterdayMIT
Open Source Alternative to:Pingdom

World Monitor

Real-time global intelligence dashboard for news and geopolitics

World Monitor combines live news, market data, and geopolitical signals on interactive world maps. Available on the web, as desktop builds, a terminal UI, CLI, SDKs, and an MCP server.

★ 91.3k⟳ todayAGPL-3.0
Open Source Alternative to:Liveuamap

Netdata

Per-second full-stack infrastructure observability platform

Netdata collects metrics, logs, and traces where they are generated, with per-second resolution, built-in dashboards, alerts, and machine learning anomaly detection on every metric.

★ 81.7k⟳ todayGPL-3.0
Open Source Alternative to:Application InsightsBetterStack+8

Grafana

Composable observability and data visualization platform

Grafana queries, visualizes, and alerts on metrics, logs, and traces from many backends. Teams build and share dashboards to explore operational data.

★ 78.2k⟳ todayAGPL-3.0
Open Source Alternative to:BetterStackNew Relic

Prometheus

Open-source metrics monitoring and time series database

Prometheus collects metrics from configured targets, evaluates rules, and can raise alerts. It stores time series data and exposes a query language called PromQL.

★ 67.9k⟳ yesterdayApache-2.0
Open Source Alternative to:PRTG Network Monitor

Sentry

Developer error tracking and performance monitoring

Sentry is a debugging platform for detecting, tracing, and fixing application issues. SDKs connect code to error, performance, replay, and related signals in one workflow.

★ 45.9k⟳ todaySource-available