You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Joe Joe <jo...@hotmail.com> on 2004/11/09 18:34:23 UTC
Use of backslash in file paths
Log4Net 1.2.0 Beta 8 doesn't seem to like backslashes in filenames - e.g.
the following example results in output to "logTrace.log" instead of
"log\Trace.log":
<appender name="DefaultAppender"
type="log4net.Appender.RollingFileAppender">
<file value="log\Trace.log" />
</appender>
Is this a bug? I can workaround by using a forward slash or doubling the
backslash, but my administrators may forget to do this...
JJoe
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
Re: Use of backslash in file paths
Posted by Eric Means <er...@gmail.com>.
You need to double up the backslashes:
<appender name="DefaultAppender"
type="log4net.Appender.RollingFileAppender">
<file value="log\\Trace.log" />
</appender>
On Tue, 09 Nov 2004 17:34:23 +0000, Joe Joe <jo...@hotmail.com> wrote:
> Log4Net 1.2.0 Beta 8 doesn't seem to like backslashes in filenames - e.g.
> the following example results in output to "logTrace.log" instead of
> "log\Trace.log":
>
> <appender name="DefaultAppender"
> type="log4net.Appender.RollingFileAppender">
> <file value="log\Trace.log" />
> </appender>
>
> Is this a bug? I can workaround by using a forward slash or doubling the
> backslash, but my administrators may forget to do this...
>
> JJoe
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
>
>
--
Eric Means
eric.means@gmail.com
http://www.randomtree.org/eric/