Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Log4J and Logger.getLogger practices

Good day,

When logging with Log4J without AspectJ I define the logger based on the
class name which allows me to define which classes get logged in my
corresponding Log4J.properties file. Easy, flexible and no recompiles. It
appears if I want to use AspectJ to weave in my logging I can no longer use
this approach since the getLogger method is being performed within the
aspect. I therefore need to define within my pointcut which libraries or
classes I want to log (AspectJ in Action, page 159).

Is there a way to weave in Log4J logging while retaining a logger per class
or per package?

Thanks in advance for your feedback.
Stu




Back to the top