public abstract class InsertCaughtExceptionLogProcessor extends AbstractLoggingProcessor
context| Constructor and Description |
|---|
InsertCaughtExceptionLogProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInsertCatchLog(java.lang.Class<?> clazz,
javassist.expr.Handler h,
javassist.CtBehavior behavior,
javassist.CtField loggerField)
Inserts the log call into the given catch-block.
|
protected LogLevel |
getExceptionLogLevel(java.lang.Class<?> enclosingClass)
Returns the
LogLevel for caught exceptions (default is LogLevel.WARNING). |
protected void |
processClass(ByteCodeHelper helper,
javassist.CtClass ctClass,
java.lang.Class<?> runtimeClass)
Processes the given class.
|
getLoggerFieldPrefix, getLoggerInitialization, getLoggerType, getLogMethodName, injectLoggerdoRun, init, runprotected void processClass(ByteCodeHelper helper, javassist.CtClass ctClass, java.lang.Class<?> runtimeClass) throws javassist.CannotCompileException
AbstractClassModificationProcessorByteCodeHelper.edit(CtClass, Class) of the given helper if a class was edited. A call to ByteCodeHelper.commit() will
be done automatically.processClass in class AbstractClassModificationProcessorhelper - The ByteCodeHelper to be used.ctClass - The javassist CtClass to process.runtimeClass - The corresponding Class.javassist.CannotCompileException - If the changes could not be compiled.protected void doInsertCatchLog(java.lang.Class<?> clazz,
javassist.expr.Handler h,
javassist.CtBehavior behavior,
javassist.CtField loggerField)
throws javassist.CannotCompileException
clazz - The class containing the given catch-block.h - The handler representing the catch-block.behavior - The method or constructor containing the catch-block.loggerField - The field containing the logger instance.javassist.CannotCompileException - If the changes can not be compiled.protected LogLevel getExceptionLogLevel(java.lang.Class<?> enclosingClass)
LogLevel for caught exceptions (default is LogLevel.WARNING).enclosingClass - The class in which the exception was caught.LogLevel for caught exceptions.Copyright © 2015. All Rights Reserved.