Logging from multiple processes to same file using Enterprise Library 4.1

后端 未结 4 1619
旧时难觅i
旧时难觅i 2021-02-15 12:23

I have several processes running concurrently that I want to log to the same file.

We have been using Enterprise Library 4.1 Logging Application Block (with a Roll

4条回答
  •  半阙折子戏
    2021-02-15 12:45

    EntLib locks the log file when it writes to it. Therefore, 2 processes cannot write to the same log file.

    When we have had this problem, that we needed to log from many difference places, to the same place, we have used database logging.

    If you are 100% stuck logging to a text file, then you could log to individual log files, and then write a program to merge these files.

提交回复
热议问题