On 08/02/06, Log4Net <[EMAIL PROTECTED]> wrote:
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.
It's not what you're after, but I gave up attempting this and just used the processID for the ASP.Net apps, essentially hard-coding the 'friendly name' of my web app:
<file type="log4net.Util.PatternString" value="C:\temp\MyApp_[%processid].log" />
Perhaps you could get away with just having two log4net config's, one for all the services (using AppDomain friendly name), and one for the web app?
 
The alternative I toyed with was that since PatternString accepts %property, I could just set a 'friendly name' global property in all my apps (use AppDomain name for .exe's, vdir name for web apps), and use that instead. But that sounded like work...
--
piers
more pedantry at http://piers7.blogspot.com/


Reply via email to