In a process I have multiple threads, each thread is creating a file with same log entries resulting in creation of multiple duplicate files within a process. This happens when multiple threads are trying to log same time.
I am using RollingFIleAppender
RollingFileAppender appender = new RollingFileAppender
StaticLogFileName = false,
File = "myFile[%processid].log"
Upon digging turns out log4Net is thread safe but not process safe
Tried multiple locking mechanism which are offered by Log4Net itself for RollingFileAppender MinimalLock, InterProcessLock and ExclusiveLock none of them helped. Nor does PatterString help.
Any ideas on how to solve the issue?