• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

unable to debug log4j

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am unable to debug log4j as it is not giving any exception and even not logging

the configuration file is as follows

and jsp code is




configuration file and jsp file accessing it are in the same directory

soni.
[ April 28, 2005: Message edited by: Soni Prasad ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
log4j generally won't throw exceptions, that's a feature.

You can pass in "-Dlog4j.debug" to get it to print out its own debug. See log4j manual. On command-line it's just java -Dlog4j.debug. You don't mention your container/server they differ in what kind of options are easily passed in to the startup scripts.

Or put it in the configuration file (but since it's probably not finding your config file that may not help initially, in xml file it looks like <log4j:configuration debug="true" ...)

Regarding your no logging problem, it probably cannot find the file soni.xml. There's a servlet example in the manual. Or leave out the call to configure() and just put the file named log4j.xml in the classpath.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic