I'm using log4net to write log file for my application. I've set the log file path as below:
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
<file value="D:\MyApp\LogFiles\MyApp_"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
.
.
.
The log file is saved in D drive. How can I change to C drive if D drive (default log file location) is not available/not exist? Is it possible to do so in the coding (C#) or I've no choice to force other users to have D drive?