Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Proper usage of log4j

Hello,

I have declaration in my class using org.apache.log4j.Logger:
    private static final Logger log = Logger.getLogger(PrihlaskaReportBean.class);

And i would like to ask for hint about how to formulate declare error pointcut, which could capture following:

log.error("some message" + e);

I want to capture this logging usage, because the "+ e" calls e.toString(), which causes to print only the message without stacktrace(stacktrace i want to see always).

Proper usage would be(which i want to enforce):

log.error("some message", e);

Best regards,

Andrej J.
AspectJ/AJDT enthusiast


Back to the top