com.quartzdesk.api.agent.log.log4j2
Class ClassicLog4j2InterceptionAppender<T extends Serializable>

java.lang.Object
  extended by org.apache.logging.log4j.core.filter.AbstractFilterable
      extended by org.apache.logging.log4j.core.appender.AbstractAppender<T>
          extended by com.quartzdesk.api.agent.log.log4j2.ClassicLog4j2InterceptionAppender<T>
All Implemented Interfaces:
org.apache.logging.log4j.core.Appender<T>, org.apache.logging.log4j.core.filter.Filterable, org.apache.logging.log4j.core.LifeCycle

Deprecated.

@Deprecated
public class ClassicLog4j2InterceptionAppender<T extends Serializable>
extends org.apache.logging.log4j.core.appender.AbstractAppender<T>

Implementation of a Log4J2 appender that passes the log events to the QuartzDesk JVM agent that intercepts log messages produced by executed jobs.

 ==== Example log4j2.xml ====
 ...

 <QuartzDeskClassic name="QUARTZDESK_JVM_AGENT">
   <PatternLayout pattern="[%d{ISO8601}] %-5p [%t] [%C:%L] - %m%n"/>
   <filters>
     <ThresholdFilter level="trace"/>
   </filters>
 </QuartzDeskClassic>

 ...

 <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
 
Fields inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
LOGGER
 
Constructor Summary
protected ClassicLog4j2InterceptionAppender(String name, org.apache.logging.log4j.core.Filter filter, org.apache.logging.log4j.core.Layout<T> layout, boolean handleException)
          Deprecated. Creates a new ClassicLog4j2InterceptionAppender instance.
 
Method Summary
 void append(org.apache.logging.log4j.core.LogEvent event)
          Deprecated.  
protected  com.quartzdesk.agent.api.domain.model.log.LoggingEventPriority convertLevel2Priority(org.apache.logging.log4j.Level level)
          Deprecated. Returns the LoggingEventPriority for the specified Log4J level.
static
<T extends Serializable>
ClassicLog4j2InterceptionAppender<T>
createAppender(String name, String suppress, org.apache.logging.log4j.core.Layout<T> layout, org.apache.logging.log4j.core.Filter filter)
          Deprecated.  
protected
<L extends org.apache.logging.log4j.core.layout.AbstractStringLayout>
Charset
getLayoutCharset(L layout)
          Deprecated. Returns the Charset used by the specified layout to format log events and produce their byte array representations.
 
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
error, error, error, getHandler, getLayout, getName, isExceptionSuppressed, isStarted, setHandler, start, stop, toString
 
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter, startFilter, stopFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassicLog4j2InterceptionAppender

protected ClassicLog4j2InterceptionAppender(String name,
                                            org.apache.logging.log4j.core.Filter filter,
                                            org.apache.logging.log4j.core.Layout<T> layout,
                                            boolean handleException)
Deprecated. 
Creates a new ClassicLog4j2InterceptionAppender instance.

Parameters:
name - The Appender name.
filter - The Filter to associate with the Appender.
layout - The layout to use to format the event.
handleException - If true, exceptions will be logged and suppressed. If false errors will be logged and then passed to the application.
Method Detail

createAppender

public static <T extends Serializable> ClassicLog4j2InterceptionAppender<T> createAppender(String name,
                                                                                           String suppress,
                                                                                           org.apache.logging.log4j.core.Layout<T> layout,
                                                                                           org.apache.logging.log4j.core.Filter filter)
Deprecated. 

append

public void append(org.apache.logging.log4j.core.LogEvent event)
Deprecated. 

convertLevel2Priority

protected com.quartzdesk.agent.api.domain.model.log.LoggingEventPriority convertLevel2Priority(org.apache.logging.log4j.Level level)
Deprecated. 
Returns the LoggingEventPriority for the specified Log4J level.

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

getLayoutCharset

protected <L extends org.apache.logging.log4j.core.layout.AbstractStringLayout> Charset getLayoutCharset(L layout)
Deprecated. 
Returns the Charset used by the specified layout to format log events and produce their byte array representations.

Parameters:
layout - a layout.
Returns:
the Charset.


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