You can also place it in another assembly:

 <lockingModel type="Company.Logging.MutexLock, Company.Logging" />

----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: Log4NET User <[email protected]>
Sent: Tuesday, May 20, 2008 4:43:47 AM
Subject: Re: how to log to differnent textfiles?

Hello!

I made it.
Simple add the code to inside #region Locking Models
and activate the new locking with
<lockingModel type="log4net.Appender.FileAppender+MutexLock" />

Works great! :-)

Thank you very much!



[EMAIL PROTECTED] schrieb:
> Hello!
>
> Thanks for the code example.
> Can you please give me a hint where I should put this peace of code 
> inside the log4net solution?
>
> thank you.
>
> Ron Grabowski schrieb:
>> I wouldn't recommend using the RollingFileAppender with the 
>> MinimalLock. There's no way for one instance of the program to know 
>> that another instance has rolled the file. The MinimalLock is slow 
>> compared to an ExclusiveLock. The most effecient file based appender 
>> across multiple processes would probably be a normal FileAppender 
>> with a mutext based lock so the processes can coordinate who is 
>> writing to the file. Someone has already implemented such a class:
>>
>>  http://www.mail-archive.com/[email protected]/msg04116.html 
>>
>>
>> That would be a good locking model to support in the next release.
>>
>> ----- Original Message ----
>> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> To: Log4NET User <[email protected]>
>> Sent: Monday, May 19, 2008 7:53:24 AM
>> Subject: Re: how to log to differnent textfiles?
>>
>> Hello!
>>
>> Thanks for reply!
>>
>> Yes, it works. But when I log many entries in both processes I receive a
>> log4net:ERROR [RollingFileAppender] Unable to acquire lock on file
>> and after that an INTERNAL ERROR. Append is False but OutputFile ... 
>> already exists.
>>
>> There is no way to set the logfile path manual?
>> Or can I specify the folder to user data folder?
>>
>> best regards,
>> Mad
>>
>>  
>

Reply via email to