I had a similar problem where the same exe could be launched multiple times
at the same time.  You can modify the filename of the log by properties in
log4net.  I used the processid there may be something like assemblyName or
something...

   <appender name="RollingFile" type="log4net.Appender.RollingFileAppender
">
       <file type="log4net.Util.PatternString"
value="log\foo-pid%processid-" />
       <rollingStyle value="Composite" />
       <appendToFile value="false" />
       <datePattern value="yyyyMMdd" />
       <maximumFileSize value="100MB" />
       <maxSizeRollBackups value="-1" />
       <StaticLogFileName value="false" />
       <layout type="log4net.Layout.PatternLayout">
           <conversionPattern value="%5level [%date] [%thread] %-
30.30logger{2}    %message%newline" />
       </layout>
   </appender>

On 7/25/07, Vanderkolk, John <[EMAIL PROTECTED]> wrote:

 Hello,

I'm writing a logger utility for a solution that has several different
points of execution. They will all be under some particular folder, but relative
to this folder their locations are different. All of these applications
are to read the same config file which specifies locations for file
appenders, one for each of the points of execution.

My problem is that since log4net reads the paths specified in the config file
as relative to the executing module, when each executable is run, it makeslog 
files in different locations when I want them
all to make log files in the same location.

EX: Here is an example with 2 executables:

…\Installation Folder\

        log.config

        Program 1\

                Sln1.exe

        Program2\

                Bin\

                        Sln2.exe

        Logs\

                Log1.txt

                Log2.txt

The problem is that since both exe's read the same config file, I can't
get them both to write logs to the same place. Short of writing my own
utility to configure the loggers I don't see any other way.

Any help would be appreciated,

John VanderKolk

[EMAIL PROTECTED]

 The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.


Reply via email to