Search in sources :

Example 1 with LoggingAdvice

use of org.apache.tapestry5.ioc.internal.services.LoggingAdvice in project tapestry-5 by apache.

the class LogWorker method transform.

public void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model) {
    List<PlasticMethod> methods = plasticClass.getMethodsWithAnnotation(Log.class);
    if (methods.isEmpty()) {
        return;
    }
    final MethodAdvice loggingAdvice = new LoggingAdvice(model.getLogger(), exceptionTracker);
    for (PlasticMethod method : methods) {
        method.addAdvice(loggingAdvice);
    }
}
Also used : LoggingAdvice(org.apache.tapestry5.ioc.internal.services.LoggingAdvice) PlasticMethod(org.apache.tapestry5.plastic.PlasticMethod) MethodAdvice(org.apache.tapestry5.plastic.MethodAdvice)

Example 2 with LoggingAdvice

use of org.apache.tapestry5.ioc.internal.services.LoggingAdvice in project tapestry-5 by apache.

the class LoggingAdvisorImpl method addLoggingAdvice.

@Override
public void addLoggingAdvice(Logger logger, MethodAdviceReceiver receiver) {
    MethodAdvice advice = new LoggingAdvice(logger, exceptionTracker);
    receiver.adviseAllMethods(advice);
}
Also used : MethodAdvice(org.apache.tapestry5.plastic.MethodAdvice)

Aggregations

MethodAdvice (org.apache.tapestry5.plastic.MethodAdvice)2 LoggingAdvice (org.apache.tapestry5.ioc.internal.services.LoggingAdvice)1 PlasticMethod (org.apache.tapestry5.plastic.PlasticMethod)1