Hierarchy API Reference

Hierarchy Filter for LogEverything.

Provides a logging filter that injects structured hierarchy fields into every LogRecord, enabling downstream consumers (JSON handlers, dashboards) to reconstruct call trees.

Fields injected: - indent_level: Current nesting depth (int) - call_id: Unique identifier for the current function call (str) - parent_call_id: call_id of the enclosing function call (str) - execution_id: Unique identifier for the current thread/task context (str) - log_type: One of “message”, “call_entry”, “call_exit” (str)

class logeverything.hierarchy.HierarchyFilter(name='')[source]

Bases: Filter

A logging filter that auto-injects hierarchy context into every LogRecord.

Usage:

import logging
from logeverything.hierarchy import HierarchyFilter

handler = logging.StreamHandler()
handler.addFilter(HierarchyFilter())
logger = logging.getLogger("myapp")
logger.addHandler(handler)
filter(record)[source]

Inject hierarchy fields into the log record.

Return type:

bool