Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0-beta8, 2.0-beta9
-
None
-
None
-
None
-
Issues occurs on Win7/64 system under Tomcat 7.0.42 / Oracle JDK 1.7.0_25; fails to occur on RHEL 5.2 system under Tomcat 7.0.26 / Oracle JDK 1.7.0_03
Description
In a webapp I'm setting a system property in my apps ServletContextListener, and using that system property in my log4j2.xml file, like so:
<appender type="FastFile" name="File" fileName="${sys:catalina.home}/logs/${sys:application-name}.log">
On my Windows machine, a log file named "${sys." (always 0 bytes) is being created instead of a log file with the application-name. The same war deployed on one of our linux servers does not create a ${sys." file and instead creates a log file with the intended application-name.
I should note that the files DO appear in the directory that sys:catalina.home should resolve to. They appear elsewhere when I don't use sys:catalina.home so I'm quite sure that this variable is resolving correctly and it is the sys:application-name which is the problem.