我们生产中的服务器很少,它们应该具有相同的log4j配置,因此我将log4j.xml文件移到了一些NFS中,并创建了一个符号链接,如下所示:
lrwxrwxrwx 1 tomcat tomcat 54 Aug 15 11:16 log4j.xml -> /storage/www/Configuration/common/tomcat/euc/log4j.xml
由于某些原因,tomcat无法识别它,并且记录器无法工作。有谁能给出一个实现它的方法吗?
(使用tomcat8和log4j 1.2.17)
发布于 2018-08-16 16:13:14
为了让tomcat能够跟踪符号链接,我发现需要向context.xml中添加以下内容(我是为驻留在../tomcat/conf目录中的able添加的):
<Context>
...
<Resources allowLinking = "true" />
...
</Context>
https://stackoverflow.com/questions/51858949
复制相似问题