Class JeroMqAppender
java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
org.apache.logging.log4j.core.appender.mom.jeromq.JeroMqAppender
- All Implemented Interfaces:
Appender,Filterable,LocationAware,LifeCycle,LifeCycle2
@Plugin(name="JeroMQ",
category="Core",
elementType="appender",
printObject=true)
public final class JeroMqAppender
extends AbstractAppender
Sends log events to one or more ZeroMQ (JeroMQ) endpoints.
Requires the JeroMQ jar (LGPL as of 0.3.5)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
AbstractAppender.Builder<B extends AbstractAppender.Builder<B>>Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State -
Field Summary
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERFields inherited from interface org.apache.logging.log4j.core.Appender
ELEMENT_TYPE, EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs a LogEvent using whatever logic this Appender wishes to use.static JeroMqAppendercreateAppender(String name, Layout<?> layout, Filter filter, Property[] properties, boolean ignoreExceptions, long affinity, long backlog, boolean delayAttachOnConnect, byte[] identity, boolean ipv4Only, long linger, long maxMsgSize, long rcvHwm, long receiveBufferSize, int receiveTimeOut, long reconnectIVL, long reconnectIVLMax, long sendBufferSize, int sendTimeOut, long sndHwm, int tcpKeepAlive, long tcpKeepAliveCount, long tcpKeepAliveIdle, long tcpKeepAliveInterval, boolean xpubVerbose) booleanCleanup the Filter.toString()Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializableMethods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stopMethods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
-
Method Details
-
createAppender
@PluginFactory public static JeroMqAppender createAppender(@Required(message="No name provided for JeroMqAppender") @PluginAttribute("name") String name, @PluginElement("Layout") Layout<?> layout, @PluginElement("Filter") Filter filter, @PluginElement("Properties") Property[] properties, @PluginAttribute("ignoreExceptions") boolean ignoreExceptions, @PluginAttribute(value="affinity",defaultLong=0L) long affinity, @PluginAttribute(value="backlog",defaultLong=100L) long backlog, @PluginAttribute("delayAttachOnConnect") boolean delayAttachOnConnect, @PluginAttribute("identity") byte[] identity, @PluginAttribute(value="ipv4Only",defaultBoolean=true) boolean ipv4Only, @PluginAttribute(value="linger",defaultLong=-1L) long linger, @PluginAttribute(value="maxMsgSize",defaultLong=-1L) long maxMsgSize, @PluginAttribute(value="rcvHwm",defaultLong=1000L) long rcvHwm, @PluginAttribute(value="receiveBufferSize",defaultLong=0L) long receiveBufferSize, @PluginAttribute(value="receiveTimeOut",defaultLong=-1L) int receiveTimeOut, @PluginAttribute(value="reconnectIVL",defaultLong=100L) long reconnectIVL, @PluginAttribute(value="reconnectIVLMax",defaultLong=0L) long reconnectIVLMax, @PluginAttribute(value="sendBufferSize",defaultLong=0L) long sendBufferSize, @PluginAttribute(value="sendTimeOut",defaultLong=-1L) int sendTimeOut, @PluginAttribute(value="sndHwm",defaultLong=1000L) long sndHwm, @PluginAttribute(value="tcpKeepAlive",defaultInt=-1) int tcpKeepAlive, @PluginAttribute(value="tcpKeepAliveCount",defaultLong=-1L) long tcpKeepAliveCount, @PluginAttribute(value="tcpKeepAliveIdle",defaultLong=-1L) long tcpKeepAliveIdle, @PluginAttribute(value="tcpKeepAliveInterval",defaultLong=-1L) long tcpKeepAliveInterval, @PluginAttribute("xpubVerbose") boolean xpubVerbose) -
append
Description copied from interface:AppenderLogs a LogEvent using whatever logic this Appender wishes to use. It is typically recommended to use a bridge pattern not only for the benefits from decoupling an Appender from its implementation, but it is also handy for sharing resources which may require some form of locking.- Parameters:
event- The LogEvent.
-
stop
Description copied from class:AbstractFilterableCleanup the Filter.- Specified by:
stopin interfaceLifeCycle2- Overrides:
stopin classAbstractFilterable- Parameters:
timeout- the maximum time to waittimeUnit- the time unit of the timeout argument- Returns:
- true if the receiver was stopped cleanly and normally, false otherwise.
-
toString
- Overrides:
toStringin classAbstractAppender
-