I have a relatively simple log4j configuration in Tomcat 8.0 on Windows
<Configuration>
<Appenders>
<File name="FileLog" fileName="${env:CATALINA_BASE}/logs/pidashboard.log">
<PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</File>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="FileLog"/>
</Root>
</Loggers>
</Configuration>
on my development machine, filename resolves and the log is created appropriately. On my deployment machine, I get an error saying it can't create the file named - literally - ${env:CATALINA_BASE}/logs/pidashboard.log
, if I change the line to the hardcoded path to which CATALINA_BASE resolves, the log gets created correctly.
These are fairly vanilla installations of Tomcat, so I'm unsure what's causing the difference. My development machine is running Windows 10 and my production machine is running Windows Server 2008, but I wouldn't expect that to impact this specific scenario.