0
votes

We have few servers in production, which should have the same configuration of log4j, therefore I've moved the log4j.xml file to some NFS, and created a symlink as follows:

lrwxrwxrwx 1 tomcat tomcat   54 Aug 15 11:16 log4j.xml -> /storage/www/Configuration/common/tomcat/euc/log4j.xml

For some reason, tomcat does not recognize it, and the logger does not work. Can anyone suggest a way to achieve it?

(Using tomcat8 and log4j 1.2.17)

1

1 Answers

0
votes

For tomcat to be able to follow symbolic links, I found that one needs to add to the context.xml (I did it for the one resides in the ../tomcat/conf dir) the following:

<Context>
 ...
 <Resources allowLinking = "true" />
 ...
</Context>