Yuval,

 

Will programmatically changing the log file name (and keeping the rest of the configuration from the config file) be sufficient?

If it is, I have a blog entry about it on: http://www.l4ndash.com/Blogs/tabid/65/EntryID/18/Default.aspx

 

Best regards

Georg

Log4Net Dashboard / Log4Net Viewer

 

 


From: Log4Net [mailto:[EMAIL PROTECTED]
Sent: 7. februar 2006 21:51
To: [email protected]
Subject: setting RollingFileAppender output file name based on appdomain in ASP.NET application

 

hi,
I have several services and an ASP.NET application installed on the same machine.
I want to use the rolling file appender and have each process log into its own set of files.
ideally i would like to use one log4net configuration file to configure logging for all the running processes.
I figured out how to use the [%appdomain] to separate the output of the services to different files:
<file type="log4net.Util.PatternString" value="C:\Logs\Log[%appdomain].txt" />

but since the ASP.NET application has as "unfriendly" application domain which looks something like : "/LM/W3SVC/1/Root/MyW/MyWebApp-2-127838163201845375"
log4net created a sub directory and puts the log file there.
is there any way to configure log4net to give a hard coded specific file name in case the of a file name patterns that matches an IIS app domain?
is there any way to change the the ASP.NET code or deployment of the application in order to force a certain friendly name instead of /LM/W3... ?

Thanks,
Yuval

Reply via email to