CONNECT_LOG4J_LOGGERS does not seem working

579 views
Skip to first unread message

Zainal A

unread,
Apr 20, 2021, 10:06:11 AM4/20/21
to Confluent Platform
Hi,
I am looking into why I cannot override the log level for specific class(es).
So in my experiment, I set CONNECT_LOG4J_LOGGERS with "org.apache.kafka.clients.admin.KafkaAdminClient=DEBUG"
Before that I already set LOG_LEVEL to debug just to see which classes have DEBUG logging, then I set that environment variable back to info, and re-run the connect job with CONNECT_LOG4J_LOGGERS is set above.

I check the file /etc/kafka/connect-log4j.properties contains:

log4j.rootLogger=INFO, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n

log4j.logger.io.confluent.connect.s3.S3SinkTask=DEBUG

and the JVM args has this flag:
-Dlog4j.configuration=file:/etc/kafka/connect-log4j.properties


Unfortunately, I still don't see DEBUG output log for KafkaAdminClient class. Do you know what I missed here?

Thanks,
zainal

Zainal A

unread,
Apr 20, 2021, 1:51:13 PM4/20/21
to Confluent Platform
I followed example from https://docs.confluent.io/platform/current/connect/logging.html#changing-log-levels

I set CONNECT_LOG4J_LOGGERS to org.apache.kafka.connect.runtime.WorkerSinkTask=DEBUG and check the file /etc/kafka/connect-log4j.properties does contain this line:

log4j.logger.org.apache.kafka.connect.runtime.WorkerSinkTask=DEBUG

Yet I still don't see any DEBUG logging. Perhaps I incorrectly use the feature??

Zainal A

unread,
Apr 20, 2021, 6:15:52 PM4/20/21
to Confluent Platform
I looked at our schema registry job, i.e. setting SCHEMA_REGISTRY_LOG4J_LOGGERS to io.confluent.kafka=DEBUG and I am able to see the DEBUG logging.
Looking at the file /etc/schema-registry/log4j.properties, I see it does have this line:

log4j.logger.io.confluent.kafka=DEBUG, stdout

So it looks like that extra ", stdout" may be the change that is missing from /etc/kafka/connect-log4j.properties ? I wonder if this is a known issue?

Haji imam syafei sjom msc Musa isa al-qqsa

unread,
May 1, 2021, 8:56:35 PM5/1/21
to confluent...@googlegroups.com
The Bill

--
You received this message because you are subscribed to the Google Groups "Confluent Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to confluent-platf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/confluent-platform/fd32d8e2-0152-4297-849f-90441d78454an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages