On my dev machine, I have several appenders that write to various log
files:

<param name="File"
value="C:\\Inetpub\\wwwroot\\testsite\\Data\\Logs\\log.txt" />

When I move this to a different server, the file path won't always be
C:\inetpub\wwwroot\testsite... Is there a way I can use a relative path
on the param tag or on the log4net tag?

<param name="File" value="~/Data/Logs/log.txt" />

<log4net debug="true" BasePath="d:\\inetpub\\">

Its a pain having to make sure all the paths are correct (especially
for long config files). Depending on the deployment environment, I may
not know the true physical path unless I do some digging around.

I saw that Configure() has an overload that accepts a System.IO.Stream
and/or XmlElement. I suppose I could load the file from disk, change
the file paths dynmically, then send the config information to
Configure(). Is there a better way?

- Ron

Reply via email to