com.quartzdesk.api.agent.log.jul
Class ClassicJulInterceptionHandler<E>

java.lang.Object
  extended by java.util.logging.Handler
      extended by com.quartzdesk.api.agent.log.jul.ClassicJulInterceptionHandler<E>

Deprecated.

@Deprecated
public class ClassicJulInterceptionHandler<E>
extends Handler

Implementation of a Java util logging handler that passes the log records to the QuartzDesk JVM agent that intercepts log messages produced by executed jobs.

 ==== Example logging.properties ====
 # Handlers
 handlers = ..., com.quartzdesk.api.common.log.jul.ClassicJulInterceptionHandler

 # QuartzDesk Agent interception handler
 # com.quartzdesk.api.agent.log.jul.ClassicJulInterceptionHandler.level = ALL
 # com.quartzdesk.api.agent.log.jul.ClassicJulInterceptionHandler.formatter = formatter class
 # com.quartzdesk.api.agent.log.jul.ClassicJulInterceptionHandler.filter = filter class

 ...
 ====
 
This implementation is statically bound to the QuartzDesk JVM Agent API and to the QuartzDesk domain object API. Therefore this handler requires a JVM with an installed QuartzDesk JVM Agent.

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

Constructor Summary
ClassicJulInterceptionHandler()
          Deprecated. Creates a new ClassicJulInterceptionHandler instance.
 
Method Summary
 void close()
          Deprecated.  
protected  com.quartzdesk.agent.api.domain.model.log.LoggingEventPriority convertLevel2Priority(Level level)
          Deprecated. Returns the LoggingEventPriority for the specified Log4J level.
 void flush()
          Deprecated.  
protected  Filter getFilterProperty(String name, Filter defaultValue)
          Deprecated. Returns the filter instance of the class named by the "name" property.
protected  Formatter getFormatterProperty(String name, Formatter defaultValue)
          Deprecated. Returns the formatter instance of the class named by the "name" property.
protected  Level getLevelProperty(String name, Level defaultValue)
          Deprecated. Returns the level for this handler named by the "name".
 void publish(LogRecord record)
          Deprecated. If the QuartzDesk agent's logging interceptor wishes to intercept the specified log record, then this method formats the log record and passes the result to the logging interceptor.
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassicJulInterceptionHandler

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

Method Detail

publish

public void publish(LogRecord record)
Deprecated. 
If the QuartzDesk agent's logging interceptor wishes to intercept the specified log record, then this method formats the log record and passes the result to the logging interceptor.

Specified by:
publish in class Handler
Parameters:
record - a log record.

flush

public void flush()
Deprecated. 
Specified by:
flush in class Handler

close

public void close()
           throws SecurityException
Deprecated. 
Specified by:
close in class Handler
Throws:
SecurityException

getLevelProperty

protected Level getLevelProperty(String name,
                                 Level defaultValue)
Deprecated. 
Returns the level for this handler named by the "name". If the property is not defined, then we return the defaultValue.

Method inspired by the getLevelProperty method in StreamHandler.

Parameters:
name - a logging config property with level name.
defaultValue - the default level.
Returns:
the level.

getFilterProperty

protected Filter getFilterProperty(String name,
                                   Filter defaultValue)
Deprecated. 
Returns the filter instance of the class named by the "name" property. If the property is not defined or has problems we return the defaultValue.

Method inspired by the getFilterProperty method in StreamHandler.

Parameters:
name - a logging config property with filter class name.
defaultValue - the default filter.
Returns:
the filter.

getFormatterProperty

protected Formatter getFormatterProperty(String name,
                                         Formatter defaultValue)
Deprecated. 
Returns the formatter instance of the class named by the "name" property. If the property is not defined or has problems we return the defaultValue.

Method inspired by the getFormatterProperty method in StreamHandler.

Parameters:
name - a logging config property with formatter class name.
defaultValue - the default formatter.
Returns:
the formatter.

convertLevel2Priority

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

Parameters:
level - a Java util logging log level.
Returns:
the LoggingEventPriority for the specified Log4J level.


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