• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
sandeeprajsingh tandon
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply,
I ulimtatly used Log4j
 
reply
    Bookmark Topic Watch Topic
  • New Topic