public class Log4jLogQuery extends LogQuerySupport implements Log4jLogQueryMBean
mapper| Constructor and Description |
|---|
Log4jLogQuery() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendMavenCoordinates(org.apache.log4j.spi.LoggingEvent loggingEvent) |
protected String |
filterLogEvents(LogFilter filter) |
protected LogResults |
filterLogResults(Predicate<LogEvent> predicate,
int maxCount) |
protected Properties |
getDefaultProperties() |
LruList<org.apache.log4j.spi.LoggingEvent> |
getEvents() |
LogResults |
getLogResults(int maxCount)
Returns the recent log events as a
LogResults object which is then serialized |
Properties |
getProperties() |
int |
getSize() |
boolean |
isAddMavenCoordinates() |
protected String |
loadCoords(String coords,
String filePath,
String classifier) |
void |
logMessage(org.apache.log4j.spi.LoggingEvent record) |
LogResults |
queryLogResults(LogFilter filter)
Queries the log results using the given filter
|
void |
reconnectAppender()
Provides a hook you can call if the underlying log4j
configuration is reloaded so that you can force the appender
to get re-registered.
|
void |
setAddMavenCoordinates(boolean addMavenCoordinates) |
void |
setEvents(LruList<org.apache.log4j.spi.LoggingEvent> events) |
void |
setProperties(Properties properties) |
void |
setSize(int size) |
void |
start()
Registers the object with JMX
|
void |
stop()
Unregisters the object with JMX
|
protected LogEvent |
toLogEvent(org.apache.log4j.spi.LoggingEvent element) |
addJarEntryToIndex, allLogResults, ensureStartsWithSlash, filterLogEvents, getArtifactFile, getHostName, getJavaDoc, getLogEvents, getMbeanName, getMbeanServer, getSource, isRoot, jarIndex, jarIndex, jarIndex, jsonQueryLogResults, jsonToLogFilter, loadString, logResultsSince, registerMBeanServer, setHostName, setMbeanName, setMbeanServer, toJSON, unregisterMBeanServerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallLogResults, filterLogEvents, getJavaDoc, getLogEvents, getSource, jsonQueryLogResults, logResultsSincepublic void start()
LogQuerySupportstart in class LogQuerySupportpublic void reconnectAppender()
Log4jLogQueryMBeanreconnectAppender in interface Log4jLogQueryMBeanpublic void stop()
LogQuerySupportstop in class LogQuerySupportpublic LogResults getLogResults(int maxCount) throws IOException
LogQuerySupportMBeanLogResults object which is then serializedgetLogResults in interface LogQuerySupportMBeanmaxCount - maximum number to return o <0 for all of themIOExceptionpublic LogResults queryLogResults(LogFilter filter)
LogQuerySupportMBeanqueryLogResults in interface LogQuerySupportMBeanfilter - the filter to apply to the logsprotected LogResults filterLogResults(Predicate<LogEvent> predicate, int maxCount)
protected LogEvent toLogEvent(org.apache.log4j.spi.LoggingEvent element)
protected String filterLogEvents(LogFilter filter) throws IOException
IOExceptionprotected void appendMavenCoordinates(org.apache.log4j.spi.LoggingEvent loggingEvent)
protected String loadCoords(String coords, String filePath, String classifier) throws IOException
loadCoords in class LogQuerySupportIOExceptionprotected Properties getDefaultProperties()
public LruList<org.apache.log4j.spi.LoggingEvent> getEvents()
public void setEvents(LruList<org.apache.log4j.spi.LoggingEvent> events)
public int getSize()
public void setSize(int size)
public boolean isAddMavenCoordinates()
public void setAddMavenCoordinates(boolean addMavenCoordinates)
public Properties getProperties()
public void setProperties(Properties properties)
public void logMessage(org.apache.log4j.spi.LoggingEvent record)
logMessage in interface Log4jLogQueryMBeanCopyright © 2016 JBoss by Red Hat. All rights reserved.