• 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 Configuration

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Day !
I'm looking for some opinions. What is the most commonly used way to initialize and configure log4j under Tomcat ? The three means I have read about are :
a) a text properties file
b) an xml properties file
c) doing the aboe with a intialization servlet.
I'll be using log4j in some custom tags being accessed from JSP pages running on Tomcat.
I'm ordering some books on this topic, however, it would be great if I can get a jump start in this area while I'm waiting !
Thanks !
Sylvia
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm guessing most people use #1, a text properties file. Because it's been around longer than the xml properties file.
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I choose a) a text properties file, like most people.
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a) is suitable for simple works
b) is suitable for complex works
c) is suitable for demo and teaching purpose

Originally posted by Sylvia H Charbonneau:
Good Day !
I'm looking for some opinions. What is the most commonly used way to initialize and configure log4j under Tomcat ? The three means I have read about are :
a) a text properties file
b) an xml properties file
c) doing the aboe with a intialization servlet.
I'll be using log4j in some custom tags being accessed from JSP pages running on Tomcat.
I'm ordering some books on this topic, however, it would be great if I can get a jump start in this area while I'm waiting !
Thanks !
Sylvia

 
Ranch Hand
Posts: 398
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have used it as a properties file (txt file). I find it the easiest to do. Mike, how can using as an XML file make it easier for complex works? Can you please elaborate on it?
Thanks,
vasu
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vasu maj asks:
I have used it as a properties file (txt file). I find it the easiest to do.
Mike, how can using as an XML file make it easier for complex works?
Can you please elaborate on it?


I'm not Mike, and I realize that this question has been around for a few weeks. Still, I'll try to answer it.
From the Log4J Javadocs:

hth
MAM
[ May 04, 2004: Message edited by: M. A. McAngus ]
 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gang !!
I did some experimenting, and found that xml config files were much easier to use that text properties files. I've chosen to go with those.
Thanks again!
S
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic