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 ni...@apache.org on 2005/01/17 18:45:39 UTC
cvs commit: logging-log4net/src/Config XmlConfiguratorAttribute.cs
nicko 2005/01/17 09:45:39
Modified: src/Config XmlConfiguratorAttribute.cs
Log:
Updated doc comments
Revision Changes Path
1.8 +37 -0 logging-log4net/src/Config/XmlConfiguratorAttribute.cs
Index: XmlConfiguratorAttribute.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Config/XmlConfiguratorAttribute.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XmlConfiguratorAttribute.cs 23 Nov 2004 01:37:29 -0000 1.7
+++ XmlConfiguratorAttribute.cs 17 Jan 2005 17:45:38 -0000 1.8
@@ -42,6 +42,37 @@
/// without calling one of the <see cref="XmlConfigurator.Configure()"/>
/// methods.
/// </para>
+ /// <para>
+ /// If neither of the <see cref="ConfigFile"/> or <see cref="ConfigFileExtension"/>
+ /// properties are set the configuration is loaded from the application's .config file.
+ /// If set the <see cref="ConfigFile"/> property takes priority over the
+ /// <see cref="ConfigFileExtension"/> property. The <see cref="ConfigFile"/> property
+ /// specifies a path to a file to load the config from. The path is relative to the
+ /// application's base directory; <see cref="AppDomain.BaseDirectory"/>.
+ /// The <see cref="ConfigFileExtension"/> property is used as a postfix to the assembly file name.
+ /// The config file must be located in the application's base directory; <see cref="AppDomain.BaseDirectory"/>.
+ /// For example in a console application setting the <see cref="ConfigFileExtension"/> to
+ /// <c>config</c> has the same effect as not specifying the <see cref="ConfigFile"/> or
+ /// <see cref="ConfigFileExtension"/> properties.
+ /// </para>
+ /// <para>
+ /// The <see cref="Watch"/> property can be set to cause the <see cref="XmlConfigurator"/>
+ /// to watch the configuration file for changes.
+ /// </para>
+ /// <note>
+ /// <para>
+ /// Log4net will only look for assembly level configuration attributes once.
+ /// When using the log4net assembly level attributes to control the configuration
+ /// of log4net you must ensure that the first call to any of the
+ /// <see cref="log4net.Core.LoggerManager"/> methods is made from the assembly with the configuration
+ /// attributes.
+ /// </para>
+ /// <para>
+ /// If you cannot guarantee the order in which log4net calls will be made from
+ /// different assemblies you must use programmatic configuration instead, i.e.
+ /// call the <see cref="XmlConfigurator.Configure"/> method directly.
+ /// </para>
+ /// </note>
/// </remarks>
/// <author>Nicko Cadell</author>
/// <author>Gert Driesen</author>
@@ -79,6 +110,9 @@
/// the <see cref="XmlConfigurator"/>. This file path is relative to the
/// <b>application base</b> directory (<see cref="AppDomain.BaseDirectory"/>).
/// </para>
+ /// <para>
+ /// The <see cref="ConfigFile"/> takes priority over the <see cref="ConfigFileExtension"/>.
+ /// </para>
/// </remarks>
public string ConfigFile
{
@@ -98,6 +132,9 @@
/// The path to the config file is built by using the <b>application
/// base</b> directory (<see cref="AppDomain.BaseDirectory"/>),
/// the <b>assembly name</b> and the config file extension.
+ /// </para>
+ /// <para>
+ /// The <see cref="ConfigFile"/> takes priority over the <see cref="ConfigFileExtension"/>.
/// </para>
/// </remarks>
public string ConfigFileExtension