You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "C0urante (via GitHub)" <gi...@apache.org> on 2023/03/29 21:51:32 UTC
[GitHub] [kafka] C0urante commented on a diff in pull request #13475: KAFKA-14652: Add the flow to the log context and the Connect-managed …
C0urante commented on code in PR #13475:
URL: https://github.com/apache/kafka/pull/13475#discussion_r1152519227
##########
connect/runtime/src/main/java/org/apache/kafka/connect/util/LoggingContext.java:
##########
@@ -181,11 +187,16 @@ public static LoggingContext forOffsets(ConnectorTaskId id) {
* @param connectorName the name of the connector; may not be null
* @param scope the scope; may not be null
* @param taskNumber the 0-based task number; may be null if there is no associated task
+ * @param prefix optional prefix for the value; may be null
* @return the prefix; never null
*/
- static String prefixFor(String connectorName, Scope scope, Integer taskNumber) {
+ static String prefixFor(String connectorName, Scope scope, Integer taskNumber, String prefix) {
StringBuilder sb = new StringBuilder();
sb.append("[");
+ if (prefix != null) {
+ sb.append(prefix);
+ sb.append("|");
+ }
Review Comment:
I've proposed changes to the logging context before and they've been met with (valid) concerns about causing issues with logging analysis tools that are set up to parse contexts by, e.g., regex.
I hate to say it, but I think this kind of change requires a KIP since it entails risk of breaking users' setups.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org