weiqingy opened a new pull request, #542:
URL: https://github.com/apache/flink-agents/pull/542

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   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`
     - [x] `doc-included`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to