You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by CAGATAY TUNALI <ca...@oksijen.com> on 2005/01/18 10:11:21 UTC

Log4j Problem with Multiple Application

Hi,

I have 5 different java applications(one has main method, others are
threads) which uses log4j for logging purpose. The mechanism which is
used for to run the programs, is
A manager application starts the other applications. Each application
has its own log4j configuration file with different names.
I put root logger descreption for every file of the applications.
The manager does not have logger.
//////////////////////////////////////////////////////////////////
<root>
<priority value="DEBUG" />
<appender-ref ref="App1Appender" />
</root>


<root>
<priority value="DEBUG" />
<appender-ref ref="App2Appender" />
</root>


<root>
<priority value="DEBUG" />
<appender-ref ref="App3Appender" />
</root>


<root>
<priority value="DEBUG" />
<appender-ref ref="App4Appender" />
</root>
//////////////////////////////////////////////////////////////////


But When I did this, App1 and App2 applications did not log. I try to
remove root logger from some of the files that only one file will have
root logger description. At this point I get the error
//////////////////////////////////////////////////////////////////
log4j: No appenders could be found for category (some.category.name).
log4j: Please initialize the log4j system properly.
//////////////////////////////////////////////////////////////////
I know I must declare root loger to solve this problem but when I put
the root logger declaration to every file, some of the loggers do not
log.


In summary, I have 5 applications which have different log4j xml
configuration file. And I want each of them to be configured according
to the given file and logs correctly.
Could you suggest something to solve this problem.
Thanks :)
Ahmet Çağatay Tunalı
-------------------------------------------------------------------------------------
Software Engineer
Oksijen Technology
GSM:0 543 502 24 54
VPN:2454
Direct Phone:0 212 448 87 68
Internal Phone:8768
e-mail:cagatay.tunali@oksijen.com
-------------------------------------------------------------------------------------