File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes log4j problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j problem" Watch "log4j problem" New topic
Author

log4j problem

ranjan Khaba
Greenhorn

Joined: Jan 16, 2008
Posts: 22
Hi all,
I have a web based application that consists of some business modules.
And I am using log4j to log every incoming request to that modules.
I want every module have own log files so I can trace every request in each module.

The log are generated in the jboss console but not in the file which is given in the log4j.xml. What may be the probable reason.

Thanks in advance
Jibitesh Prasad
Greenhorn

Joined: Feb 20, 2007
Posts: 20
check the Appender that is associated.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18124
    
    8

A possible reason is that JBoss includes log4j for its own logging purposes. That would mean the the classloader hierarchy would look like this:

1. Java system APIs

2. JBoss classes

3. Your web application and its classes

So when your web application uses a log4j class, it finds it at level 2. Classes loaded from here cannot see level 3, so it does not find your configuration file. Instead it finds JBoss's configuration file, at level 2.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j problem
 
Similar Threads
Delete Logfiles generated using log4j when jboss is running
Log4j output files
log4j problem
How t o have multiple log files in WSAD and WAS using log4j ?
manifest classpath