Fabian Lange created KAFKA-10210:

             Summary: Use templated log message for LogContext
                 Key: KAFKA-10210
                 URL: https://issues.apache.org/jira/browse/KAFKA-10210
             Project: Kafka
          Issue Type: Bug
          Components: clients
    Affects Versions: 2.5.0
            Reporter: Fabian Lange

We are using an error aggregation framework which uses the log4j/slf4j log 
message templates and aggregates based on them. That means any parameters 
passed in will not count as new errors, but just as new instances of the same 

We are having the problem that every time we do a restart, we are getting 
errors like these:

[Consumer clientId=saas_tenant_prod_ui-backend_saas_topic, 
groupId=saas_tenant_prod_ui-backend] Offset commit failed on partition 
saas_topic-0 at offset 3518: The coordinator is not aware of this member.

As far as I can tell, the Error message is created using a template like
Offset commit failed on partition {} at offset {}: The coordinator is not aware 
of this member.

But then LogContext adds the prefix by concatenating it to the log message:


        public void error(String message, Object... args) {
            logger.error(addPrefix(message), args);

I think it would be desirable to add the prefix as template variable "{}" and 
then pass the prefix text as first argument.

This message was sent by Atlassian Jira

Reply via email to