• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Markis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic