I'm starting this new project and we are thrashing out our logging/debugging approach and I wanted to put the question to the rest of you on SO, given
private final static Logger logger = LoggerFactory.getLogger(getClass());
...
public void doSumething(){
...
if(logger.isDebugEnabled())
logger.debug("...");
}
or
@After("execution(* *.doSomething())")
public void logAfter(JoinPoint jp){
logger.debug("...");
}
Is the AOP approach really any better than using the traditional approach? Or does AOP excel in a particular use case for logging/profiling?