LogCore

Getting started

  • Quickstart
    • Install
    • A logger in two lines
    • Configuration
    • Five things you’ll actually use
      • 1. Structured fields
      • 2. Exception logging with traceback
      • 3. Operation timing
      • 4. Correlation IDs for request tracing
      • 5. Sensitive data redaction (automatic)
    • What’s next

Guides

  • Correlation IDs
    • Three ways to set a correlation ID
      • Context manager (recommended)
      • Bare setter (for middleware)
      • At logger creation
    • Reading the current correlation ID
    • Async safety
    • Output
    • See also
  • Log sampling
    • When to use each strategy
    • Quickstart
    • How tail-based works
    • Using set_correlation_id instead of the context manager
    • Environment variables
    • Observability: stats()
    • What’s deliberately out of scope (for now)
    • See also
  • OpenTelemetry integration
    • Install
    • Usage
    • Compatible backends
    • With correlation IDs
  • Framework integration
    • Flask
    • FastAPI
    • ASGI middleware (generic)
  • Capturing third-party logs
    • configure_stdlib
      • Arguments
    • Using dictConfig instead
    • Correlation IDs across a request
      • ASGI (FastAPI, Starlette, Litestar, Quart)
      • WSGI (Flask, Django)
    • Non-blocking delivery
  • Sensitive data redaction
    • Default protected fields
    • What “partial masking” means
    • Customizing
    • What gets walked

Reference

  • API reference
    • Top-level exports
    • Logger
      • get_logger()
      • LogCoreLogger
    • Sampling
      • Sampler
      • SamplerStats
      • Decision
      • sampler_from_env()
    • Correlation IDs
      • set_correlation_id()
      • get_correlation_id()
      • correlation_id_context()
    • Timing helpers
      • Timer
      • AsyncTimer
    • Configuration
      • LogCoreConfig
      • LogLevel
      • create_config()
    • Formatters
      • JSONFormatter
      • TextFormatter
      • RedactingFormatter
    • Handlers
      • ConsoleHandler
      • FileHandler
      • create_handlers()
    • Lifecycle
      • flush()
      • shutdown()
      • dropped_record_count()
    • Standard library interop
      • configure_stdlib()
      • reset_stdlib()
      • dict_config_formatter()
    • Web middleware
      • CorrelationIdMiddleware
      • WSGICorrelationIdMiddleware
  • Configuration reference
    • Core options
    • Output and delivery options
    • Sampling options
    • Boolean parsing for env vars
    • Invalid environment values
    • Logger caching and reconfiguration
    • Reading the current correlation ID without a logger
  • Changelog
    • Unreleased
    • 0.1.7 - 2026-08-15
      • Security
      • Added
      • Changed
      • Fixed
      • Notes
    • 0.1.6 - 2026-05-27
      • Added
      • Changed
    • 0.1.5 - 2026-05-20
      • Fixed
      • Changed
    • 0.1.4 - 2025-01-15
      • Added
      • Changed
      • Fixed
    • 0.1.3 - 2024-12-01
      • Changed
    • 0.1.2 - 2024-11-15
      • Added
      • Changed
    • 0.1.1 - 2024-10-20
      • Added
    • 0.1.0 - 2024-10-01
      • Added
LogCore
  • Search


© Copyright 2026, LogCore Contributors.

Built with Sphinx using a theme provided by Read the Docs.