aspose file tools*
The moose likes Aspect Oriented Programming and the fly likes Logging with Java Commons Logging through AOP write logs to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "Logging with Java Commons Logging through AOP write logs to a file" Watch "Logging with Java Commons Logging through AOP write logs to a file" New topic
Author

Logging with Java Commons Logging through AOP write logs to a file

sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 70
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.

Kindly let me know the steps.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1672
    
    7

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.


[How To Ask Questions][Read before you PM me]
sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 70
Thanks for the reply,
I ulimtatly used Log4j
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging with Java Commons Logging through AOP write logs to a file