Ron, That second patch looks good, my only suggestion would be to move where the AppSettings are read from the Repository/Hierarchy/XmlHierarchyConfigurator.cs class. The XmlHierarchyConfigurator will only be executed if a user configures log4net via a config file, it will not be run if they configure log4net programmatically. It would probably be best to have the AppSettings override the default values (if specified) even if the user has decided to configure log4net programmatically.
I think that the code for checking the AppSettings should either go into the log4net.Core.LoggerManager static constructor or into a new static constructor on SystemInfo. I think that adding it to a static constructor on SystemInfo would make the most sense. Could you make that change and commit the patch to subversion. Cheers, Nicko > -----Original Message----- > From: Ron Grabowski (JIRA) [mailto:[EMAIL PROTECTED] > Sent: 06 November 2005 20:37 > To: [email protected] > Subject: [jira] Updated: (LOG4NET-55) Allow default null > text,"(null)", and default not available text, "NOT > AVAILABLE", to be configurable. > > [ http://issues.apache.org/jira/browse/LOG4NET-55?page=all ] > > Ron Grabowski updated LOG4NET-55: > --------------------------------- > > Attachment: ConfigurableNullTextAndNotAvailableText2.patch > > Per Nikco's suggestion: > > http://www.mail-archive.com/log4net-dev%40logging.apache.org/m > sg01133.html > http://www.mail-archive.com/log4net-dev%40logging.apache.org/m > sg01132.html > > Enables setting of values from AppSettings and code. > > > Allow default null text,"(null)", and default not available > text, "NOT AVAILABLE", to be configurable. > > > ---------------------------------------------------------------------- > > -------------------------------- > > > > Key: LOG4NET-55 > > URL: http://issues.apache.org/jira/browse/LOG4NET-55 > > Project: Log4net > > Type: Improvement > > Reporter: Ron Grabowski > > Priority: Trivial > > Attachments: ConfigurableNullTextAndNotAvailableText.patch, > > ConfigurableNullTextAndNotAvailableText2.patch > > > > "(null)" and "NOT AVAILABLE" are not settable by the user. > Allow them to be settable via AppSettings keys: > > <add key="log4net.NullText" value="NULL-TEXT" /> <add > > key="log4net.NotAvailableText" value="NOT-AVAILABLE-TEXT" /> or > > attributes on the log4net node: > > <log4net nullText="NULL-TEXT" > notAvailableText="NOT-AVAILABLE-TEXT"> > > ... > > </log4net> > > or in code: > > log4net.Util.SystemInfo.NullText = "NULL-TEXT"; > > log4net.Util.SystemInfo.NotAvailableText = "NOT-AVAILABLE-TEXT"; > > -- > 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 > > >
