Skip to content

[Feature] Support per-event-type configurable log levels for event log #541

@weiqingy

Description

@weiqingy

Search before asking

  • I searched in the issues and found nothing similar.

Description

Summary

Add per-event-type configurable log levels to the event log system, as identified in the 0.3 planning discussion (#516).

Motivation

The current event log system only supports binary accept/reject filtering via EventFilter. There is no way to:

  • Configure different log levels for different event types (e.g., VERBOSE for ChatRequestEvent, OFF for ContextRetrievalRequestEvent)
  • Distinguish between standard and verbose logging detail (both behave identically)
  • Filter logged events by level or event type in downstream tools without parsing nested JSON

Changes

  • New EventLogLevel enum: OFF, STANDARD, VERBOSE
  • Per-event-type levels configured via EventLoggerConfig builder and string-based config options
  • STANDARD truncates long string fields (configurable eventLogMaxFieldLength, default 1024); VERBOSE logs full content
  • Top-level eventType field in JSON output for easier downstream filtering
  • Startup validation warns about unrecognized event type names in config
  • Backward compatible: existing configs and JSON format continue to work

Config Options

Key Default Description
eventLogLevel STANDARD Global default level (OFF, STANDARD, VERBOSE)
eventLogLevels (none) Per-type overrides. Format: ChatRequestEvent=VERBOSE,InputEvent=OFF
eventLogMaxFieldLength 1024 Max chars for string fields at STANDARD level. 0 disables truncation.

Related

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature[Issue Type] New features or improvements to existing features.priority/majorDefault priority of the PR or issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions