|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log4j.AppenderSkeleton
com.quartzdesk.api.agent.log.log4j.Log4jInterceptionAppender
public class Log4jInterceptionAppender
Implementation of a Log4J appender that passes the log events to the QuartzDesk JVM agent that intercepts log messages produced by executed jobs.
==== Example log4j.xml ====
...
<!--
Appender that passes all received log events to the QuartzDesk agent to intercept
log events produced by executed Quartz jobs.
-->
<appender name="QUARTZDESK_JVM_AGENT" class="com.quartzdesk.api.agent.log.log4j.Log4jInterceptionAppender">
<param name="threshold" value="DEBUG"/>
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="conversionPattern" value="[%d{ISO8601}] %!.1p [%t] [%C:%L] - %m%n"/>
</layout>
</appender>
...
<root>
<priority value="WARN"/>
...
<appender-ref ref="QUARTZDESK_JVM_AGENT"/>
</root>
This implementation is not statically bound to the QuartzDesk JVM Agent API, nor to the domain object API.
Therefore it is safe to use this appender on JVMs running without an installed QuartzDesk JVM Agent.
LoggingInterceptorWrapper| Field Summary |
|---|
| Fields inherited from class org.apache.log4j.AppenderSkeleton |
|---|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
| Constructor Summary | |
|---|---|
Log4jInterceptionAppender()
Creates a new Log4jInterceptionAppender instance. |
|
| Method Summary | |
|---|---|
protected void |
append(org.apache.log4j.spi.LoggingEvent event)
If the QuartzDesk agent's logging interceptor wishes to intercept the specified logging event, then this method formats the log event using the provided pattern layout and passes the result to the logging interceptor. |
void |
close()
Stops this appender. |
protected LoggingInterceptorWrapper.MessagePriority |
convertLevel2Priority(org.apache.log4j.Level level)
Returns the LoggingInterceptorWrapper.MessagePriority for the specified Log4J level. |
boolean |
requiresLayout()
|
| Methods inherited from class org.apache.log4j.AppenderSkeleton |
|---|
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Log4jInterceptionAppender()
Log4jInterceptionAppender instance.
| Method Detail |
|---|
public void close()
public boolean requiresLayout()
protected void append(org.apache.log4j.spi.LoggingEvent event)
append in class org.apache.log4j.AppenderSkeletonevent - a logging event object.protected LoggingInterceptorWrapper.MessagePriority convertLevel2Priority(org.apache.log4j.Level level)
LoggingInterceptorWrapper.MessagePriority for the specified Log4J level.
level - a log4j level.
LoggingInterceptorWrapper.MessagePriority for the specified Log4J level.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||