I have tried that. It seems that an application will lock the log file of
every appender in the config file even if a specific appender is not used.


-----Original Message-----
From: Deepanjan Ganguly [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 19, 2005 2:45 PM
To: Log4NET User
Subject: RE: shared library

Hi Yofnik,
You could define different appenders using logfile or rolling and have
different log files names in each. I have not used the file appenders
but I do it with the adonetappender and based on the app the sql/stored
procs are different.

Thanks
Deep.

-----Original Message-----
From: yofnik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 19, 2005 1:41 PM
To: [email protected]
Subject: shared library

Hello everyone, 
I have developed collection of tools that all share a common .NET
library
that I have developed. The DLL uses log4net with the
RollingFileAppender. I
use Nant to build all the tools and copy all the executables to a "bin"
directory. 

Now here's my problem, because the shared dll uses log4net, every
application tries to open the same log file. I end up getting errors
saying
the log file is locked by another process. 

I know I can set the LockingModel to MinimalLock, but this will affect
performance significantly, won't it? 

I would really like to specify a different appender (log file) for each
executable. So instead of having "mydll.dll.log4net", I would like to
use
"myapp1.exe.log4net" or "myapp2.exe.log4net" for each application. How
can
this be accomplished? 

Your help is greatly appreciated.

Jeff




Reply via email to