com.quartzdesk.api.agent.log.logback
Class ClassicLogbackInterceptionAppender<E>

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.AppenderBase<E>
          extended by com.quartzdesk.api.agent.log.logback.ClassicLogbackInterceptionAppender<E>
All Implemented Interfaces:
ch.qos.logback.core.Appender<E>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<E>, ch.qos.logback.core.spi.LifeCycle

Deprecated.

@Deprecated
public class ClassicLogbackInterceptionAppender<E>
extends ch.qos.logback.core.AppenderBase<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.ClassicLogbackInterceptionAppender">
   <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 statically bound to the QuartzDesk JVM Agent API and to the QuartzDesk domain object API. Therefore this appender requires a JVM with an installed QuartzDesk JVM Agent.

Version:
$Id:$
Author:
Jan Moravec
See Also:
IExecutingJobLoggingInterceptor

Field Summary
protected  ch.qos.logback.core.Layout<E> layout
          Deprecated.  
 
Fields inherited from class ch.qos.logback.core.AppenderBase
name, started
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
ClassicLogbackInterceptionAppender()
          Deprecated. Creates a new ClassicLogbackInterceptionAppender instance.
 
Method Summary
protected  void append(E eventObject)
          Deprecated. 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  com.quartzdesk.agent.api.domain.model.log.LoggingEventPriority convertLevel2Priority(ch.qos.logback.classic.Level level)
          Deprecated. Returns the LoggingEventPriority for the specified Logback level.
 ch.qos.logback.core.Layout<E> getLayout()
          Deprecated. Returns the layout used by this appender.
 void setLayout(ch.qos.logback.core.Layout<E> layout)
          Deprecated. Sets the layout to be used by this appender.
 void start()
          Deprecated. Starts this appender.
 void stop()
          Deprecated. 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

layout

protected ch.qos.logback.core.Layout<E> layout
Deprecated. 
Constructor Detail

ClassicLogbackInterceptionAppender

public ClassicLogbackInterceptionAppender()
Deprecated. 
Creates a new ClassicLogbackInterceptionAppender instance.

Method Detail

getLayout

public ch.qos.logback.core.Layout<E> getLayout()
Deprecated. 
Returns the layout used by this appender.

Returns:
the layout used by this appender.

setLayout

public void setLayout(ch.qos.logback.core.Layout<E> layout)
Deprecated. 
Sets the layout to be used by this appender.

Parameters:
layout - the layout.

start

public void start()
Deprecated. 
Starts this appender.

Specified by:
start in interface ch.qos.logback.core.spi.LifeCycle
Overrides:
start in class ch.qos.logback.core.AppenderBase<E>

stop

public void stop()
Deprecated. 
Stops this appender.

Specified by:
stop in interface ch.qos.logback.core.spi.LifeCycle
Overrides:
stop in class ch.qos.logback.core.AppenderBase<E>

append

protected void append(E eventObject)
Deprecated. 
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.

Specified by:
append in class ch.qos.logback.core.AppenderBase<E>
Parameters:
eventObject - a logging event object.

convertLevel2Priority

protected com.quartzdesk.agent.api.domain.model.log.LoggingEventPriority convertLevel2Priority(ch.qos.logback.classic.Level level)
Deprecated. 
Returns the LoggingEventPriority for the specified Logback level.

Parameters:
level - a log4j level.
Returns:
the LoggingEventPriority for the specified Logback level.


Copyright © 2013–2017 QuartzDesk.com. All rights reserved.