File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes How to use Log4j - single log file for 6 j2ee modules in a project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to use Log4j - single log file for 6 j2ee modules in a project" Watch "How to use Log4j - single log file for 6 j2ee modules in a project" New topic
Author

How to use Log4j - single log file for 6 j2ee modules in a project

Markis
Greenhorn

Joined: Jun 04, 2007
Posts: 4
Hi,

My requrement is to have a single, custom log file for one entire application.
Using log4j.xml for config. I have logger put in an EJB utilility module, the same needs to be used in all other [java, ejb, web] modules in the EAR project.

Currnently log messages not written to this single logfile from all other modules.

Any thoughts on this?

Regards,
Chetan
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

I think what you're saying is that each component of the system has its own Log4J config file. You can also define a master Log4J config file in many J2EE appservers, which would make things easier to control, since there would be a single definition point instead of many.

Although even with multiple log4j configs, if they're all logging to the same file, I thought that the log messages would just concatenate to the file without conflict.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use Log4j - single log file for 6 j2ee modules in a project
 
Similar Threads
How to assemble a J2EE application?
log4j.properties file for a project with multiple modules
maven-ear-plugin: jarModule or ejbModule
[Urgent]Accessing properties file
How to use Log4j - single log file for 6 j2ee modules in a project