Is it possible to have 2 applications write to the same log file using log4net?
Yes, it is possible, as stated above, but I've now done some stress testing of this scenario.
The setup is quite simple:
When both buttons are clicked at the same time, the log entries are interspersed throughout the log. BUT, and this is the big GOTCHA, judging by the accompanying request counter, it's clear that there are race conditions. Almost every time one web project succeeds in logging its entry, the other one fails (the entry is skipped).
So, with decent traffic against this common log, you'll basically have no guarantee of which log statements actually end up in the log. The conclusion is to always have project specific log files, it seems.
The test was done with the default of "MinimalLock". I redid the test with "ExclusiveLock" as well, only to find that the first web project to configure the logger "won", basically locking out ALL other requests to log. So obviously, that's a no-go as well.