문제

I host my web application on IIS. The pool that application resides in has 4 worker processes. (Web Garden)

To make a test, for each requst to aspx page, I write the Process Id of Executing Process into log.net file log.

When I open the file log, I see only the logs of first process.

I am sure other processes are running beacuse I can see them in task manager.

May other processes have access problems to log file since first process is writing into it? How can I write to same log file from different processes of same application pool?

도움이 되었습니까?

해결책

The way to fix this is to let each worker process write to a different log file.

To do this you will need to use dynamic file names. See http://geekswithblogs.net/rgupta/archive/2009/03/03/dynamic-log-filenames-with-log4net.aspx for an example.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top