You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Nicolas Roy (JIRA)" <ji...@apache.org> on 2005/08/30 21:00:04 UTC

[jira] Created: (LOG4NET-48) Executed processes cannot auto find their app.config file

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.

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

Work around. Process A 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


[jira] Updated: (LOG4NET-48) Executed processes cannot auto find their app.config file

Posted by "Nicolas Roy (JIRA)" <ji...@apache.org>.
     [ 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


[jira] Updated: (LOG4NET-48) Executed processes cannot auto find their app.config file

Posted by "Nicolas Roy (JIRA)" <ji...@apache.org>.
     [ 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.

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));


  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 A 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.
> 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));

-- 
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


[jira] Resolved: (LOG4NET-48) Executed processes cannot auto find their app.config file

Posted by "Ron Grabowski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4NET-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Grabowski resolved LOG4NET-48.
----------------------------------

    Resolution: Won't Fix

There haven't been any updates to this ticket in a long time. Process B can't magically find the config file of Process A unless its told where to look.

> Executed processes cannot auto find their app.config file
> ---------------------------------------------------------
>
>                 Key: LOG4NET-48
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-48
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LOG4NET-48) Executed processes cannot auto find their app.config file

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LOG4NET-48?page=comments#action_12320675 ] 

Nicko Cadell commented on LOG4NET-48:
-------------------------------------

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

I will need the log4net internal debug output from process B using the XmlConfigurator attribute to configure logging.

For details on enabling log4net internal debug see:
http://logging.apache.org/log4net/release/faq.html#internalDebug 

> 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


[jira] Commented: (LOG4NET-48) Executed processes cannot auto find their app.config file

Posted by "Nicko Cadell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LOG4NET-48?page=comments#action_12320610 ] 

Nicko Cadell commented on LOG4NET-48:
-------------------------------------

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

These 2 processes are therefore completely independent. Each will have its own logging configuration.


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

This is asking log4net (in process B) to look for process B's .config file.


> Log4net didn't succeed to initialyze itself properly.

In which process?


> Looks like it didn't find process A's config file.

In process A or B? Why would log4net in process B try to 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));

Do you have the output of running with log4net internal debug enabled?
http://logging.apache.org/log4net/release/faq.html#internalDebug

So far this sounds much more like a user query than a bug.
Please post any follow up queries and info to the log4net-user mailing list.
http://logging.apache.org/log4net/support.html

Cheers.

> 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.
> 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));

-- 
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