Logging with Java Commons Logging through AOP write logs to a file
sandeeprajsingh tandon
Ranch Hand
Joined: Mar 06, 2009
Posts: 66
posted
0
Hi, We have a spring application running on glassfish server, currently being developed on Windows ultimately to be deployed on a Unix box.
I have a Simple Aspect class for logging that uses Commons logging to calculate the time needed for each method to execute.
Now,
I want to configure the app inorder to redirect the logs generated by commons logging on to a seperate log file.
I want to configure the app inorder to redirect the logs generated by commons logging on to a seperate log file.
I would use SL4J which is an abstraction on top of your logging framework. This way your options as far as logging is concerned are more flexible. Then I would use Logback as your logging implementation and configure what and where you want things logged.