Hi all, I'm quite new to Aspect J and am currently using it to enforce some
Architecture Enforcements within all our application. I've set up several
that work at present but I am struggling with the latest one. 

Problem: 

I are currently trying to move from Log4J to Lockback and slf4j, so for all
new project I am trying to create an aspect to enforce a particular logging
framework for use by the development team. 

This is out common Log4J logger creation code:


import org.apache.log4j.Logger;
private Logger log = Logger.getLogger(this.getClass());


Problem aspect below:


@DeclareError("call(* org.apache.log4j.Logger.*(..))")
static final String usingLog4JLogger = "Dont instantiate a Log4J Logger, use
a slf4j Logger Instead....!";


Can anyone point me the right direction and tell me how I can create a
pointcut to match all static Logger.getLogger(?) calls in my application. 

--
View this message in context: 
http://aspectj.2085585.n4.nabble.com/Aspect-Pointcut-to-Determine-Logger-Type-tp3333012p3333012.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to