Set Compile-Time Weaving with System.out logging
Compile-time logging with System.out logging To run aopc with logging turned on, but defaulting to the System.out logger, we run aopc with since neither jboss-logging-log4j.jar nor log4j.jar are on the classpath, JBoss AOP defaults to the System.out logger. To run: $ ant run.aopc.system.out.logging The output looks much the same as during the loadtime weaving, but this time it happens during the aopc stage: aopc.system.out.logging: ... [aopc] [aop-debug] org.jboss.aop.instrument.Instrumentor trying to transform POJO [aopc] [aop-debug] org.jboss.aop.instrument.CallerTransformer There are no caller pointcuts! [aopc] [aop-debug] org.jboss.aop.instrument.JoinpointSimpleClassifier javassist.CtMethod@ae60ead5[public notwoven ()V] matches no pointcuts [aopc] [aop-debug] org.jboss.aop.instrument.JoinpointSimpleClassifier javassist.CtMethod@7c6e6140[public boundMethod ()V] matches pointcut: execution(public void POJO->boundMethod()) [aopc] [aop-debug] org.jboss.aop.instrument.JoinpointSimpleClassifier javassist.CtConstructor@cb6009[public POJO ()V] matches no pointcuts [aopc] [aop-debug] org.jboss.aop.instrument.Instrumentor was POJO converted: true ... [aopc] Build Successful: 781 ms We also get some lugging when running the application, showing what happens when the aop information is processed at runtime when running the application: run.aopc.system.out.logging: ... [java] [aop-debug] org.jboss.aop.ClassAdvisor Creating chains for class POJO sun.misc.Launcher$AppClassLoader@a39137 [java] [aop-debug] org.jboss.aop.ClassAdvisor iterate binding file:/C:/cygwin/home/Kabir/sourcecontrol/jboss-aop/build/output/jboss-aop-snapshot/docs/aspect-framework/examples/logging/jboss-aop.xml0 execution(public void POJO->boundMethod()) [java] [debug] method matched binding: public void POJO.boundMethod() [java] [aop-debug] org.jboss.aop.advice.AdviceBinding added advisor: POJO from binding: file:/C:/cygwin/home/Kabir/sourcecontrol/jboss-aop/build/output/jboss-aop-snapshot/docs/aspect-framework/examples/logging/jboss-aop.xml0 [java] [aop-debug] org.jboss.aop.MethodMatchInfo populate bindings for public void POJO.boundMethod() all bindings [java] [aop-debug] org.jboss.aop.MethodMatchInfo 0 POJO execution(public void POJO->boundMethod()) : 1 [java] [aop-debug] org.jboss.aop.MethodMatchInfo populate bindings for public void POJO.boundMethod() actual bindings [java] [aop-debug] org.jboss.aop.MethodMatchInfo 0 POJO execution(public void POJO->boundMethod()) : 1 [java] [aop-debug] org.jboss.aop.advice.AdviceBinding added advisor: POJO from binding: file:/C:/cygwin/home/Kabir/sourcecontrol/jboss-aop/build/output/jboss-aop-snapshot/docs/aspect-framework/examples/logging/jboss-aop.xml0 [java] --- pojo.notwoven(); --- [java] notwoven() [java] --- pojo.boundMethod(); --- [java] [aop-debug] org.jboss.aop.advice.AspectFactoryWithClassLoaderSupport Using context classloader sun.misc.Launcher$AppClassLoader@a39137 to load aspect SimpleInterceptor [java] <<< Entering SimpleInterceptor [java] boundMethod [java] >>> Leaving SimpleInterceptor