开发者

Using Log4Net With Remote Processes

开发者 https://www.devze.com 2022-12-19 11:40 出处:网络
Is it p开发者_如何学Goossible to have many processes logging to one file ? I ve looked at the API with no joyFrom the log4net FAQ:

Is it p开发者_如何学Goossible to have many processes logging to one file ?

I ve looked at the API with no joy


From the log4net FAQ:

The FileAppender holds a write lock on the log file while it is logging. This prevents other processes from writing to the file, therefore it is not possible to have multiple processes log directly to the same log file, even if they are on the same machine.

You may have each process log to a RemotingAppender. The receiving RemoteLoggingServerPlugin (or IRemoteLoggingSink) can receive all the events and send them to a single log file.

0

精彩评论

暂无评论...
验证码 换一张
取 消