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 2004/06/07 03:00:46 UTC

cvs commit: logging-log4net/src/Repository/Hierarchy Hierarchy.cs

nicko       2004/06/06 18:00:46

  Modified:    src/Repository/Hierarchy Hierarchy.cs
  Log:
  Added protected methods to access the implementation of the IBasicRepositoryConfigurator and IXmlRepositoryConfigurator interfaces.
  
  Revision  Changes    Path
  1.4       +32 -0     logging-log4net/src/Repository/Hierarchy/Hierarchy.cs
  
  Index: Hierarchy.cs
  ===================================================================
  RCS file: /home/cvs/logging-log4net/src/Repository/Hierarchy/Hierarchy.cs,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Hierarchy.cs	23 Feb 2004 03:18:04 -0000	1.3
  +++ Hierarchy.cs	7 Jun 2004 01:00:46 -0000	1.4
  @@ -401,6 +401,22 @@
   		/// <param name="appender">the appender to use to log all logging events</param>
   		void IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender appender)
   		{
  +			BasicRepositoryConfigure(appender);
  +		}
  +
  +		/// <summary>
  +		/// Initialize the log4net system using the specified appender
  +		/// </summary>
  +		/// <param name="appender">the appender to use to log all logging events</param>
  +		/// <remarks>
  +		/// <para>
  +		/// This method provides the same functionality as the 
  +		/// <see cref="IBasicRepositoryConfigurator.Configure"/> method implemented
  +		/// on this object, but it is protected and therefore can be called by subclasses.
  +		/// </para>
  +		/// </remarks>
  +		protected void BasicRepositoryConfigure(log4net.Appender.IAppender appender)
  +		{
   			Root.AddAppender(appender);
   
   			Configured = true;
  @@ -418,6 +434,22 @@
   		/// </summary>
   		/// <param name="element">the element containing the root of the config</param>
   		void IXmlRepositoryConfigurator.Configure(System.Xml.XmlElement element)
  +		{
  +			XmlRepositoryConfigure(element);
  +		}
  +
  +		/// <summary>
  +		/// Initialize the log4net system using the specified config
  +		/// </summary>
  +		/// <param name="element">the element containing the root of the config</param>
  +		/// <remarks>
  +		/// <para>
  +		/// This method provides the same functionality as the 
  +		/// <see cref="IBasicRepositoryConfigurator.Configure"/> method implemented
  +		/// on this object, but it is protected and therefore can be called by subclasses.
  +		/// </para>
  +		/// </remarks>
  +		protected void XmlRepositoryConfigure(System.Xml.XmlElement element)
   		{
   			XmlHierarchyConfigurator config = new XmlHierarchyConfigurator(this);
   			config.Configure(element);