Skip to content

Instantly share code, notes, and snippets.

@vanjikumaran
Created March 30, 2020 21:42
Show Gist options
  • Save vanjikumaran/277140faab4366d8b7617443d3b74c5e to your computer and use it in GitHub Desktop.
Save vanjikumaran/277140faab4366d8b7617443d3b74c5e to your computer and use it in GitHub Desktop.
log4j 2 configuration
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Kafka name="Kafka" topic="WSO2APIMTOPIC">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n"/>
<Property name="bootstrap.servers">localhost:9092</Property>
</Kafka>
<Async name="Async" bufferSize="1054" blocking="false">
<AppenderRef ref="Kafka"/>
</Async>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="Kafka" />
</Root>
<Logger name="org.apache.kafka" level="INFO" />
</Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment