简体   繁体   English

向WSO2部署多个战争,每个战争都具有多个log4j配置

[英]Deploy multiple wars to WSO2 and each having multiple log4j configuration

I need to deploy two wars into WSO2 server with different log4j.properties file for each war. 我需要将两次War部署到WSO2服务器中,每次战争都使用不同的log4j.properties文件。 but when I deploy second war to the server. 但是当我向服务器部署第二次战争时。 it is overriding first war log4j configuration.(Goal is to maintain different logs for each war). 它覆盖了第一个war log4j配置。(目标是为每个war维护不同的日志)。

Can anybody help me on this. 有人可以帮我吗?

You can configure logging per web application. 您可以配置每个Web应用程序的日志记录。 Read This . 阅读

Bhathiya Thanks.. Initially it looked not possible with the link provided by you. Bhathiya谢谢。最初,您提供的链接似乎无法实现。 But it got resolved with some pom changes. 但是通过一些pom更改解决了它。

Solution: My pom.xml was pointing to wso2 logging dependency. 解决方案:我的pom.xml指向wso2日志记录依赖性。 so that was causing the issue to override war level log4j... I just removed server level log4j and added few log4j dependencies to the pom.xml and made it war level to work. 因此,这导致该问题覆盖了战争级别log4j。

Now I can able to create versioned logs for same web app. 现在,我可以为同一Web应用程序创建版本日志。

Thnaks 恶作剧

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM