Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top