How about simply using forward slashes? Our file appender section looks like this
      <appender name="FileAppender" type="log4net.Appender.FileAppender" >
          <param name="File" value="logs/publicweb.log" />
          <param name="AppendToFile" value="true" />
          <layout type="log4net.Layout.PatternLayout">
              <conversionPattern value="%d [%t] %-5p %c [%x] - %m%n" />
          </layout>
      </appender>
  
and works properly. If you're concerned that your ops people need a reminder, you can always add a comment.

Joe Joe wrote:
I know I can work around it by doubling the backslashes or using forward slashes.

But I'm concerned my administrators won't always remember to do this - as they don't generally need to double backslashes in filenames in .NET config files.

Why does it behave like this?  Is it a bug?


Reply via email to