You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Rainer Schuetze <sc...@geoinform.fh-mainz.de> on 2005/12/08 14:52:45 UTC

DOMConfigurator don't throw Exception

Hi,
I was wondering why the DOMConfigurator::configure(const std::string& 
filename)
don't throws an exception when the initialization (configureration) 
fails. The Log4J API says the following about the DOMConfigurator:
public static void configure(String filename)
                       throws FactoryConfigurationError
     A static version of doConfigure(String, LoggerRepository).

Regards
Rainer


Re: DOMConfigurator don't throw Exception

Posted by Rainer Schuetze <sc...@geoinform.fh-mainz.de>.
The minimum I could do from "outside" is to check if the XML-file exists 
before configure the DOMConfigurator.
But I'm really locking forward for the new feature, thanks for your 
development.
More about JoranConfigurator might be found:
http://www.qos.ch/logging/joran.pdf


Curt Arnold schrieb:
> Rainer Schuetze wrote:
> 
>> Ok, I see, throwing an Exception in the configure function generates 
>> an fatal error. But with the current log4cxx build you don't get an 
>> response if the configuration success.
>> How do you do check if the configuration was successful?
>>
>> Regards
>> Rainer
>>
> That unfortunately is also a problem with log4j from which the log4cxx 
> design is patterned.  One of my goals is to make the JoranConfigurator 
> in log4j 1.3 have additional methods cleaner failure modes and then port 
> that over to log4cxx.
> 
> 

-- 
Rainer Schuetze

i3mainz - Fachhochschule Mainz
Holzstrasse 36
55116 Mainz
Germany

Tel: +49 (0)6131 2859 682
Fax: +49 (0)6131 2859 699
schuetze@geoinform.fh-mainz.de
http://www.i3mainz.fh-mainz.de


Re: DOMConfigurator don't throw Exception

Posted by Curt Arnold <ca...@apache.org>.
Rainer Schuetze wrote:

> Ok, I see, throwing an Exception in the configure function generates 
> an fatal error. But with the current log4cxx build you don't get an 
> response if the configuration success.
> How do you do check if the configuration was successful?
>
> Regards
> Rainer
>
That unfortunately is also a problem with log4j from which the log4cxx 
design is patterned.  One of my goals is to make the JoranConfigurator 
in log4j 1.3 have additional methods cleaner failure modes and then port 
that over to log4cxx.

Re: DOMConfigurator don't throw Exception

Posted by Rainer Schuetze <sc...@geoinform.fh-mainz.de>.
Ok, I see, throwing an Exception in the configure function generates an 
fatal error. But with the current log4cxx build you don't get an 
response if the configuration success.
How do you do check if the configuration was successful?

Regards
Rainer


Rainer Schuetze schrieb:
> Hi,
> I was wondering why the DOMConfigurator::configure(const std::string& 
> filename)
> don't throws an exception when the initialization (configureration) 
> fails. The Log4J API says the following about the DOMConfigurator:
> public static void configure(String filename)
>                       throws FactoryConfigurationError
>     A static version of doConfigure(String, LoggerRepository).
> 
> Regards
> Rainer
> 
>