How to specify common application data folder for log4net?

We just use this:

<param name="File" value="${ALLUSERSPROFILE}/Company/Product/Logs/error.log"/>

It works great.


This line can simply be inserted into your current appender configuration:

<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
   <param name="File" value="${ALLUSERSPROFILE}/Company/Product/Logs/error.log"/>
</appender>

Leave a Comment