Two different applications hosted on the JBoss Portal Server integrate logging

On JBoss Portal Server 2.7.2, we have two different wars, in which log4j.xml separately have combined log entries in them. We use commons-logging over log4j.

App1 configured File1.log as an output log file in its log4j.xml, App1.war, hosted on the JBoss Portal.

App2 configured File2.log as the output log file in its log4j.xml, App2.war, hosted on the JBoss Portal.

Current scenario → App1 registrar entries go to File1.log App2 registrar entries go to File2.log

Required scenario → Only App1 registrar entries should be written to File1.log Only App2 registrar entries should be written to File2.log and the server log is another file.

What we are missing here and how to fix the problem.

Thanks and Regards JavaDeveloperIndiaHyd.

+4
source share
1 answer

You can create application-based log files at runtime using RoutingAppender , in which case specific application logs will not be confused with server logs.

To create a RoutingAppender , you can reference this

0
source

Source: https://habr.com/ru/post/1444114/


All Articles