true/false would be a good start but people would ask what failed:

 // ???
 if (log4net.Config.XmlConfigurator.Configure() == false)
 {
  processLog4netConfigError(log4net.Config.ConfigException);
 }

What's the right thing to do with a log4net config error? Write the
message to System.Diagnostics.Trace? Imagine a log4net node with many
appenders. Will Configure() only return true if all properties of all
items are set correctly? Sometimes I mistakenly set RollingFileAppender
properties on a FileAppender. I usually catch the error a few days
later by glancing at the internal debug messages. I want my application
to continue logging even thought I mistyped one or two properties.

--- "Rupp, Richard (GE Healthcare)" <[EMAIL PROTECTED]> wrote:

> With the current beta we're using (1.2.9), if the document file
> passed into the XML configurator is malformed a console appender is
> created. There is no indication a problem has occurred. It would be
> useful to get a true/false indicator that the Configure() method was
> successful.
> 
> For our purposes having an <AppSettings/> element that contains a key
> identifying a "default" appender would be great. Maybe something
> along the line of:
> 
>   <add key="log4net.default" value="..."/>
> 
> where the content of value would be "Console" or "File". The "File"
> appender would support an additional key identifying the filename.
> 
>   <add key="log4net.default.filename" value="..."/>
> 
> The default appender would be used if there were problems with the
> configuration or the configuration is missing.
> 
> Thanks.

Reply via email to