public class EventTypeAwareKafkaCallback extends Object implements LoggingCallback
| Constructor and Description |
|---|
EventTypeAwareKafkaCallback(org.apache.kafka.clients.producer.Producer<Long,LoggingEvent> producer)
Constructors kafka logging callback, which sends events to topics same as event types
|
EventTypeAwareKafkaCallback(org.apache.kafka.clients.producer.Producer<Long,LoggingEvent> producer,
java.util.function.Function<String,String> eventTypeToTopicMapping)
Constructs kafka logging callback, which sends events to topics according to eventTypeToTopicMapping
|
| Modifier and Type | Method and Description |
|---|---|
void |
audit(LoggingEvent e)
logging of audit related events
|
void |
debug(LoggingEvent e)
corresponds to DEBUG level of logging
|
void |
error(LoggingEvent e)
corresponds to ERROR level of logging
|
void |
info(LoggingEvent e)
corresponds to INFO level of logging
|
void |
trace(LoggingEvent e)
corresponds to TRACE level of logging
|
void |
warn(LoggingEvent e)
corresponds to WARN level of logging
|
public EventTypeAwareKafkaCallback(org.apache.kafka.clients.producer.Producer<Long,LoggingEvent> producer)
producer - producer used to send eventspublic EventTypeAwareKafkaCallback(org.apache.kafka.clients.producer.Producer<Long,LoggingEvent> producer, java.util.function.Function<String,String> eventTypeToTopicMapping)
producer - producer used to send eventseventTypeToTopicMapping - function which takes event type and returns topic, where should it be sentpublic void info(LoggingEvent e)
LoggingCallbackinfo in interface LoggingCallbacke - event to logpublic void warn(LoggingEvent e)
LoggingCallbackwarn in interface LoggingCallbacke - event to logpublic void debug(LoggingEvent e)
LoggingCallbackdebug in interface LoggingCallbacke - event to logpublic void error(LoggingEvent e)
LoggingCallbackerror in interface LoggingCallbacke - event to logpublic void trace(LoggingEvent e)
LoggingCallbacktrace in interface LoggingCallbacke - event to logpublic void audit(LoggingEvent e)
LoggingCallbackaudit in interface LoggingCallbacke - event to logCopyright © 2018. All rights reserved.