[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
Open
Conversation
…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
e002c6f to
8ba7983
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue: #541
Purpose of change
Add per-event-type configurable log levels to the event log system, as proposed in #516.
EventLogLevelenum (OFF,STANDARD,VERBOSE) with string-based config parsingEventLoggerConfigbuilder andAgentConfigOptionsSTANDARDtruncates string fields exceeding configurableeventLogMaxFieldLength(default 1024);VERBOSElogs full contenteventTypefield in JSON output for easier downstream filteringEventFiltercontinue to workTests
EventLogLevelTest— enum behavior, string parsing, edge casesFileEventLoggerTest— OFF filtering, VERBOSE/STANDARD in JSON, truncation, level+filter composition, backward compatEventLogRecordJsonSerdeTest— logLevel and eventType serde, truncation, missing-field backward compatAPI
New public APIs:
EventLogLevelenum withOFF,STANDARD,VERBOSEandparseLogLevels(String)EventLoggerConfig.Builder:defaultLogLevel(),eventLogLevel(),eventLogLevels(),maxFieldLength()EventLoggerConfig:getDefaultLogLevel(),getEventLogLevels(),getMaxFieldLength(),getEffectiveLogLevel(Event),shouldLog(Event, EventContext)EventLogRecord: new constructors acceptingEventLogLevelandmaxFieldLengthAgentConfigOptions:EVENT_LOG_LEVEL,EVENT_LOG_LEVELS,EVENT_LOG_MAX_FIELD_LENGTHDocumentation
doc-neededdoc-not-neededdoc-included