@Plugin(name="Log4j2ConsoleAppender",
category="Core",
elementType="appender",
printObject=true)
public class Log4j2ConsoleAppender
extends org.apache.logging.log4j.core.appender.AbstractAppender
限定符 | 构造器和说明 |
---|---|
protected |
Log4j2ConsoleAppender(java.lang.String name,
org.apache.logging.log4j.core.Filter filter,
org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout,
boolean ignoreExceptions,
org.apache.logging.log4j.core.config.Property[] properties,
org.apache.logging.log4j.core.config.AppenderRef[] appenderRefs,
int cacheLogCount) |
限定符和类型 | 方法和说明 |
---|---|
static void |
addLog(java.lang.String log)
增加日志
|
void |
append(org.apache.logging.log4j.core.LogEvent event) |
static Log4j2ConsoleAppender |
createAppender(java.lang.String name,
org.apache.logging.log4j.core.Filter filter,
org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout,
boolean ignoreExceptions,
org.apache.logging.log4j.core.config.Property[] properties,
int cacheLogCount,
org.apache.logging.log4j.core.config.AppenderRef[] appenderRefs) |
static java.util.LinkedHashMap<java.lang.String,java.lang.String> |
getLeaveLogs(java.lang.String startKey)
获取剩下的日志
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toString
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stop, stop
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
protected Log4j2ConsoleAppender(java.lang.String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout, boolean ignoreExceptions, org.apache.logging.log4j.core.config.Property[] properties, org.apache.logging.log4j.core.config.AppenderRef[] appenderRefs, int cacheLogCount)
public static void addLog(java.lang.String log)
log
- 日志字符串public static java.util.LinkedHashMap<java.lang.String,java.lang.String> getLeaveLogs(java.lang.String startKey)
startKey
- startKeypublic void append(org.apache.logging.log4j.core.LogEvent event)
@PluginFactory public static Log4j2ConsoleAppender createAppender(@PluginAttribute(value="name") java.lang.String name, @PluginElement(value="Filter") org.apache.logging.log4j.core.Filter filter, @PluginElement(value="Layout") org.apache.logging.log4j.core.Layout<? extends java.io.Serializable> layout, @PluginAttribute(value="ignoreExceptions") boolean ignoreExceptions, @PluginElement(value="property") org.apache.logging.log4j.core.config.Property[] properties, @PluginAttribute(value="cacheLogCount") int cacheLogCount, @PluginElement(value="AppenderRef") org.apache.logging.log4j.core.config.AppenderRef[] appenderRefs)