Skip to content

feat: Introduce structured logging system (GStreamer GST_DEBUG style) #287

@justinjoy

Description

@justinjoy

Implement flexible, section-based logging system similar to GStreamer's GST_DEBUG.

Features:

  • Log levels: TRACE(5), DEBUG(4), INFO(3), WARN(2), ERROR(1)
  • Section filtering by category: JOIN, CONSOLIDATION, ARRANGEMENT, EVAL, SESSION, etc.
  • Environment variable syntax: WL_LOG=JOIN:4,CONSOLIDATION:3
  • Runtime enable/disable without recompilation

Example usage:

WL_LOG=JOIN:5 ./bench_flowlog  # Trace all JOIN operations
WL_LOG=CONSOLIDATION:3 ./bench  # Show consolidation warnings+
WL_LOG=*:2 ./bench             # All errors and warnings

Benefits:

  • Development/debugging: Fine-grained control
  • Production: Zero overhead when disabled
  • Performance measurement: Clean output control
  • Replaces ad-hoc fprintf scattered throughout codebase

This is a future enhancement. Current approach: Simple getenv() gating (#277).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions