I'm trying to configure BurstFilter for one specific Appender using log4j.properties format. The version of log4j is 1 and Apache Kafka unfortunately doesn't have support or log4j2 yet. https://home.apache.org/~dongjin/post/apache-kafka-log4j2-support/.
I'm not able to find out any .properties format example for burstfilter on internet.
This is the first part of my configuration. Where I'd like to add BurstFilter. This configuration works well.
log4j.rootLogger=INFO, graylog2
log4j.logger.org.reflections=ERROR
log4j.appender.graylog2=org.graylog2.log.GelfAppender
log4j.appender.graylog2.graylogHost=1.1.1.1
log4j.appender.graylog2.graylogPort=12201
log4j.appender.graylog2.originHost=my-hostname
log4j.appender.graylog2.facility=gelf-java
log4j.appender.graylog2.layout=org.apache.log4j.PatternLayout
log4j.appender.graylog2.layout.ConversionPattern=%d{ISO8601} %-5p %X{dbz.connectorType}|%X{dbz.connectorName}|%X{dbz.connectorContext} %m [%c]%n
log4j.appender.graylog2.extractStacktrace=true
log4j.appender.graylog2.addExtendedInformation=true
log4j.appender.graylog2.additionalFields={'hostname': 'my-hostname'}
What I want to add is something like:
log4j.appender.graylog2.filter=org.apache.logging.log4j.core.filter.BurstFilter
log4j.appender.graylog2.filter.level=INFO
log4j.appender.graylog2.filter.rate=16
log4j.appender.graylog2.filter.maxBurst=100
but when I use some properties to XML converter such as http://logback.qos.ch/translator/ I'm not able to get the desired outcome as seen here: https://logging.apache.org/log4j/2.x/manual/filters.html
I haven't really tried to use this configuration on my Java server and I want to avoid trial and error method. Any help appreciated.