Skip to content

[FLINK-AGENTS-541][api][runtime] Support per-event-type configurable log levels for event log#542

Open
weiqingy wants to merge 1 commit intoapache:mainfrom
weiqingy:feature/per-event-type-log-levels
Open

[FLINK-AGENTS-541][api][runtime] Support per-event-type configurable log levels for event log#542
weiqingy wants to merge 1 commit intoapache:mainfrom
weiqingy:feature/per-event-type-log-levels

Conversation

@weiqingy
Copy link
Collaborator

@weiqingy weiqingy commented Feb 18, 2026

Linked issue: #541

Purpose of change

Add per-event-type configurable log levels to the event log system, as proposed in #516.

  • New EventLogLevel enum (OFF, STANDARD, VERBOSE) with string-based config parsing
  • Per-event-type level overrides via EventLoggerConfig builder and AgentConfigOptions
  • STANDARD truncates string fields exceeding configurable eventLogMaxFieldLength (default 1024); VERBOSE logs full content
  • Top-level eventType field in JSON output for easier downstream filtering
  • Startup warning for unrecognized event type names in config (catches typos)
  • Backward compatible: existing configs, JSON format, and EventFilter continue to work

Tests

  • EventLogLevelTest — enum behavior, string parsing, edge cases
  • FileEventLoggerTest — OFF filtering, VERBOSE/STANDARD in JSON, truncation, level+filter composition, backward compat
  • EventLogRecordJsonSerdeTest — logLevel and eventType serde, truncation, missing-field backward compat
  • Spotless formatting and license header checks pass

API

New public APIs:

  • EventLogLevel enum with OFF, STANDARD, VERBOSE and parseLogLevels(String)
  • EventLoggerConfig.Builder: defaultLogLevel(), eventLogLevel(), eventLogLevels(), maxFieldLength()
  • EventLoggerConfig: getDefaultLogLevel(), getEventLogLevels(), getMaxFieldLength(), getEffectiveLogLevel(Event), shouldLog(Event, EventContext)
  • EventLogRecord: new constructors accepting EventLogLevel and maxFieldLength
  • AgentConfigOptions: EVENT_LOG_LEVEL, EVENT_LOG_LEVELS, EVENT_LOG_MAX_FIELD_LENGTH

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

@github-actions github-actions bot added priority/major Default priority of the PR or issue. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. doc-included Your PR already contains the necessary documentation updates. labels Feb 18, 2026
…log levels for event log

Add per-event-type configurable log levels to the event log system.

- New EventLogLevel enum (OFF, STANDARD, VERBOSE) with string parsing
- EventLoggerConfig gains per-type log level map, defaultLogLevel,
  maxFieldLength, getEffectiveLogLevel(), and shouldLog()
- New config options: eventLogLevel, eventLogLevels, eventLogMaxFieldLength
- STANDARD truncates string fields exceeding maxFieldLength (default 1024);
  VERBOSE logs full content without truncation
- 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
@weiqingy weiqingy force-pushed the feature/per-event-type-log-levels branch from e002c6f to 8ba7983 Compare February 18, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-included Your PR already contains the necessary documentation updates. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments