java - How to use different log4j2.xml files for different webservices -


I am switching to log4j2 and how to use different log4j2.xml files for different webservices. I am using WebSpace 8.5. For example: I have 3 web servers (YS1, YS2, and WS3) with 3 different log files (WSG1, WSO2, YSOL3). <3 p> 3 different logs such as 4 J2 configuration files (with different names or with different names with different names, but in different directories)

In Log4j1.x I can use PropertyConfigurator to specify path and filename to specify log4j1.x. It is not available in log4j2I created the log4j.configurationFile system property but it only allows me to specify the path and file name of a single configuration file.

Thoughts? thank you in advanced.

You can make separate log4j2.xml configurations in separate web applications (war files). You can only have one log4j2.xml configuration in the same web application.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -