|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<E>
com.quartzdesk.api.agent.log.logback.LogbackInterceptionAppender<E>
public class LogbackInterceptionAppender<E>
Implementation of a Logback appender that passes the log events to the QuartzDesk JVM agent that intercepts log messages produced by executed jobs.
==== Example logback.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.logback.LogbackInterceptionAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>TRACE</level>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>[%date] %.-1level [%thread] [%logger:%line] - %msg%n</pattern>
</layout>
</appender>
...
<root level="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 | |
|---|---|
protected ch.qos.logback.core.Layout<E> |
layout
|
| Fields inherited from class ch.qos.logback.core.AppenderBase |
|---|
name, started |
| Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
|---|
context |
| Constructor Summary | |
|---|---|
LogbackInterceptionAppender()
Creates a new LogbackInterceptionAppender instance. |
|
| Method Summary | |
|---|---|
protected void |
append(E eventObject)
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. |
protected LoggingInterceptorWrapper.MessagePriority |
convertLevel2Priority(ch.qos.logback.classic.Level level)
Returns the LoggingInterceptorWrapper.MessagePriority for the specified Logback level. |
ch.qos.logback.core.Layout<E> |
getLayout()
Returns the layout used by this appender. |
void |
setLayout(ch.qos.logback.core.Layout<E> layout)
Sets the layout to be used by this appender. |
void |
start()
Starts this appender. |
void |
stop()
Stops this appender. |
| Methods inherited from class ch.qos.logback.core.AppenderBase |
|---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString |
| Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
|---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
|---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
| Field Detail |
|---|
protected ch.qos.logback.core.Layout<E> layout
| Constructor Detail |
|---|
public LogbackInterceptionAppender()
LogbackInterceptionAppender instance.
| Method Detail |
|---|
public ch.qos.logback.core.Layout<E> getLayout()
public void setLayout(ch.qos.logback.core.Layout<E> layout)
layout - the layout.public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.AppenderBase<E>public void stop()
stop in interface ch.qos.logback.core.spi.LifeCyclestop in class ch.qos.logback.core.AppenderBase<E>protected void append(E eventObject)
append in class ch.qos.logback.core.AppenderBase<E>eventObject - a logging event object.protected LoggingInterceptorWrapper.MessagePriority convertLevel2Priority(ch.qos.logback.classic.Level level)
LoggingInterceptorWrapper.MessagePriority for the specified Logback level.
level - a log4j level.
LoggingInterceptorWrapper.MessagePriority for the specified Logback level.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||