• 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

Configuring commons logging

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I configure commons logging for my application


import org.apache.commons.logging.*;
import org.apache.commons.logging.impl.*;
public MyClass{
protected static Log log = LogFactory.getLog(ACE_SAXController.class);

public static void main(String[] arg)
{
System.setProperty("org.apache.commons.logging.LogFactory", ACE_ReadProperty.getValue("LOG_FACTORY"));// LOG_FACTORY is set to org.apache.commons.logging.impl.LogFactoryImpl
log.info("Hello World");
}
}

I don't know how to configure this thing. When I run this program i give the log message "Hello World" to the system output. How do I configure it to throw this message to a log file. how do i configure the location of the log file?. I got a deadline of today to deliver it. Please help

Regs
thomas
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you looked at the sections entitled "Configuration" in this document?

http://jakarta.apache.org/commons/logging/guide.html
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic