[ http://issues.apache.org/jira/browse/LOG4NET-48?page=all ]

Nicolas Roy updated LOG4NET-48:
-------------------------------

    Description: 
Process A starts process B using the System.Diagnostics.Process.Start() method. 
 

Process B use [assembly: log4net.Config.XmlConfigurator(Watch=true)] to auto 
configure its log4net environment.

Process B instance of Log4net didn't succeed to initialyze itself properly.  
Looks like it didn't find process B's config file.

Work around. Process B initialyze log4net manualy:
> 
>             string codeBase =
> System.Reflection.Assembly.GetEntryAssembly().CodeBase;
>               Uri uri = new Uri(codeBase + ".config");
>               log4net.Config.XmlConfigurator.Configure(new
> FileInfo(uri.LocalPath));


  was:
Process A starts process B using the System.Diagnostics.Process.Start() method. 
 

Process B use [assembly: log4net.Config.XmlConfigurator(Watch=true)] to auto 
configure its log4net environment.

Log4net didn't succeed to initialyze itself properly.  Looks like it didn't 
find process A's config file.

Work around. Process B initialyze log4net manualy:
> 
>             string codeBase =
> System.Reflection.Assembly.GetEntryAssembly().CodeBase;
>               Uri uri = new Uri(codeBase + ".config");
>               log4net.Config.XmlConfigurator.Configure(new
> FileInfo(uri.LocalPath));



> Executed processes cannot auto find their app.config file
> ---------------------------------------------------------
>
>          Key: LOG4NET-48
>          URL: http://issues.apache.org/jira/browse/LOG4NET-48
>      Project: Log4net
>         Type: Bug
>   Components: Core
>     Versions: 1.2.9
>     Reporter: Nicolas Roy
>     Priority: Minor

>
> Process A starts process B using the System.Diagnostics.Process.Start() 
> method.  
> Process B use [assembly: log4net.Config.XmlConfigurator(Watch=true)] to auto 
> configure its log4net environment.
> Process B instance of Log4net didn't succeed to initialyze itself properly.  
> Looks like it didn't find process B's config file.
> Work around. Process B initialyze log4net manualy:
> > 
> >             string codeBase =
> > System.Reflection.Assembly.GetEntryAssembly().CodeBase;
> >             Uri uri = new Uri(codeBase + ".config");
> >             log4net.Config.XmlConfigurator.Configure(new
> > FileInfo(uri.LocalPath));

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to