• 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

Log4j help

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Any body help me

i am developing Framework for my project.My requirement is logging and Audting.My doubt:is it possible to sent some log messages to database and some log messages to file using same properties file
Can anybody help me how to do..it is helpful to sent code for that.


thanks


Regards

gurudev
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gurudev,

Yes, it is possible to send log messages to more than one destination. You have to configure appropriate Appenders in the log4j configuration file and you'll be all set.

In the Log4J distribution there's an example to show multiple destination configurations, It is configured to send messages to a File and GUI at the same time. So you may want to look for examples to look for JDBCAppenders.

Hope this helps,
Pavan
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to get serious with log4j get the complete log4j manual
 
reply
    Bookmark Topic Watch Topic
  • New Topic