Class LogAppender
java.lang.Object
org.apache.pulsar.functions.instance.LogAppender
- All Implemented Interfaces:
org.apache.logging.log4j.core.Appender,org.apache.logging.log4j.core.LifeCycle
LogAppender class that is used to send log statements from Pulsar Functions logger
to a log topic.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
org.apache.logging.log4j.core.LifeCycle.State -
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.Appender
ELEMENT_TYPE, EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionLogAppender(org.apache.pulsar.client.api.PulsarClient pulsarClient, String logTopic, String fqn, String instance) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(org.apache.logging.log4j.core.LogEvent logEvent) org.apache.logging.log4j.core.ErrorHandlerorg.apache.logging.log4j.core.Layout<? extends Serializable>getName()org.apache.logging.log4j.core.LifeCycle.StategetState()booleanvoidbooleanbooleanvoidsetHandler(org.apache.logging.log4j.core.ErrorHandler errorHandler) voidstart()voidstop()
-
Constructor Details
-
LogAppender
-
-
Method Details
-
append
public void append(org.apache.logging.log4j.core.LogEvent logEvent) - Specified by:
appendin interfaceorg.apache.logging.log4j.core.Appender
-
getName
- Specified by:
getNamein interfaceorg.apache.logging.log4j.core.Appender
-
getLayout
- Specified by:
getLayoutin interfaceorg.apache.logging.log4j.core.Appender
-
ignoreExceptions
public boolean ignoreExceptions()- Specified by:
ignoreExceptionsin interfaceorg.apache.logging.log4j.core.Appender
-
getHandler
public org.apache.logging.log4j.core.ErrorHandler getHandler()- Specified by:
getHandlerin interfaceorg.apache.logging.log4j.core.Appender
-
setHandler
public void setHandler(org.apache.logging.log4j.core.ErrorHandler errorHandler) - Specified by:
setHandlerin interfaceorg.apache.logging.log4j.core.Appender
-
getState
public org.apache.logging.log4j.core.LifeCycle.State getState()- Specified by:
getStatein interfaceorg.apache.logging.log4j.core.LifeCycle
-
initialize
public void initialize()- Specified by:
initializein interfaceorg.apache.logging.log4j.core.LifeCycle
-
start
public void start()- Specified by:
startin interfaceorg.apache.logging.log4j.core.LifeCycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.apache.logging.log4j.core.LifeCycle
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceorg.apache.logging.log4j.core.LifeCycle
-
isStopped
public boolean isStopped()- Specified by:
isStoppedin interfaceorg.apache.logging.log4j.core.LifeCycle
-