posted 13 years ago
What is the best method to use Log4j in Spring?
I created a class called log util and declared the required loggers in this class and called the same from my other classes using DI(defining the Logutil class as a property of my other classes)
eg :
Problem with this approach is that I need to declare traceLog property for all my classes I dont want to do that .The only option I can see is to declare a Super class for All clases and delcare traceLog as a property of this super class. I dont want to go down that approach as I dont wanto to create an unwanted super class
Please let me know the best approach to configure Log4j with Spring