[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Aspect/Pointcut to Determine Logger Type
|
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:
Aspect/Pointcut to Determine Logger Type
Sent from the
AspectJ - users mailing list archive at Nabble.com.