Skip to main content

Module logging

Module logging 

Source
Expand description

Structured Logging Infrastructure

Provides configurable logging with multiple output formats and environment-based filtering. Integrates with the tracing ecosystem for structured, leveled logging.

§Features

  • Environment-based log filtering
  • Multiple output formats (compact, pretty, JSON)
  • Zero-cost when disabled
  • Standard error and warning helpers

§Configuration

Set log level via environment variables:

  • EMBEDDENATOR_LOG="info" - custom filter
  • RUST_LOG="debug" - fallback filter

Set output format:

  • EMBEDDENATOR_LOG_FORMAT="json" - structured JSON output
  • EMBEDDENATOR_LOG_FORMAT="pretty" - pretty-printed output
  • EMBEDDENATOR_LOG_FORMAT="compact" - compact output (default)

Functions§

debug
error
info
init
warn