Truong Hong Thi said:
Just config so that each app does not lock the file. That affects
performance because the app has to open the file, flush the message,
and close the file immediatly.
Add following element into FileAppender/RollingFileAppender elements of
each XML config file:
<param name="LockingModel"
type="log4net.Appender.FileAppender+MinimalLock" />
That's the correct config, but your first sentence is wrong - it *does*
lock the file. The point of MinimalLock is that it locks it, but does
so for as short a time as possible. Without *any* locking, two
different programs could corrupt each others' lock.
From the docs for MinimalLock:
<quote>
Acquires the file lock for each write
</quote>
That's quite different from not locking the file at all!