Hi I have a log4j RollingFileAppender configured like this
<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="MaxBackupIndex" value="10" />
<param name="File" value="${java.io.tmpdir}\\myLogFile.log" />
</appender>
my problem is that java.io.tmpdir is mapped to C:\Temp and log4j does not escape the backslash. When I start the process I see the following error
java.io.FileNotFoundException: c: emp\myLogFile.log (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unk
it is not possible for me to modify the Environment Variables on all my users' machines and I do not want to hard-code the log path.
I could write my own extension to RollingFileAppender to fix this, but I was hoping that there would be a pre-existing way around this.
What are my best options ?