You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2018/06/01 13:42:14 UTC

logging-log4net git commit: LOG4NET-586 de-virtualize Namespace and Prefix properties [Forced Update!]

Repository: logging-log4net
Updated Branches:
  refs/heads/feature/LOG4NET-586 9dc492647 -> 4da2ae2eb (forced update)


LOG4NET-586 de-virtualize Namespace and Prefix properties


Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/4da2ae2e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/4da2ae2e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/4da2ae2e

Branch: refs/heads/feature/LOG4NET-586
Commit: 4da2ae2eb371ca8bb0ba6027391094e5cac31d7f
Parents: a8925fc
Author: Stefan Bodewig <bo...@apache.org>
Authored: Fri Jun 1 15:35:49 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Fri Jun 1 15:42:03 2018 +0200

----------------------------------------------------------------------
 src/Layout/XmlLayoutBaseNS.cs        |  4 ++--
 src/Layout/XmlLayoutSchemaLog4jNS.cs | 33 +++----------------------------
 2 files changed, 5 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/4da2ae2e/src/Layout/XmlLayoutBaseNS.cs
----------------------------------------------------------------------
diff --git a/src/Layout/XmlLayoutBaseNS.cs b/src/Layout/XmlLayoutBaseNS.cs
index c3e1f5b..c4fe537 100644
--- a/src/Layout/XmlLayoutBaseNS.cs
+++ b/src/Layout/XmlLayoutBaseNS.cs
@@ -131,7 +131,7 @@ namespace log4net.Layout
 		/// <summary>
 		/// The namespace URI to use for the elements and attributes written by this layout.
 		/// </summary>
-		public virtual string NamespaceUri
+		public string NamespaceUri
 		{
 			get { return m_namespaceUri; }
 			set { m_namespaceUri = value; }
@@ -146,7 +146,7 @@ namespace log4net.Layout
 		/// select the prefix or use no prefix at all.
 		/// </para>
 		/// </remarks>
-		public virtual string Prefix
+		public string Prefix
 		{
 			get { return m_prefix; }
 			set { m_prefix = value; }

http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/4da2ae2e/src/Layout/XmlLayoutSchemaLog4jNS.cs
----------------------------------------------------------------------
diff --git a/src/Layout/XmlLayoutSchemaLog4jNS.cs b/src/Layout/XmlLayoutSchemaLog4jNS.cs
index 96f35f2..53852e0 100644
--- a/src/Layout/XmlLayoutSchemaLog4jNS.cs
+++ b/src/Layout/XmlLayoutSchemaLog4jNS.cs
@@ -55,7 +55,7 @@ namespace log4net.Layout
 		/// <summary>
 		/// Constructs an XMLLayoutSchemaLog4jNS
 		/// </summary>
-		public XmlLayoutSchemaLog4jNS() : base()
+		public XmlLayoutSchemaLog4jNS() : this(false)
 		{
 		}
 
@@ -78,39 +78,12 @@ namespace log4net.Layout
 		/// </remarks>
 		public XmlLayoutSchemaLog4jNS(bool locationInfo) :  base(locationInfo)
 		{
+			NamespaceUri = LOG4J_SCHEMA;
+			Prefix = LOG4J_PREFIX;
 		}
 
 		#endregion
 
-		#region Public Properties
-
-		/// <summary>
-		/// The namespace URI to use for the elements and attributes written by this layout.
-		/// </summary>
-		/// <remarks>
-		/// <para>
-		/// Unless configured explicitly http://logging.apache.org/log4j is used.
-		/// </para>
-		/// </remarks>
-		public override string NamespaceUri
-		{
-			get { return base.NamespaceUri == null ? LOG4J_SCHEMA : base.NamespaceUri; }
-		}
-
-		/// <summary>
-		/// The prefix to use for the elements and attributes written by this layout.
-		/// </summary>
-		/// <remarks>
-		/// <para>
-		/// Unless configured explicitly log4j is used.
-		/// </para>
-		/// </remarks>
-		public override string Prefix
-		{
-			get { return base.Prefix == null ? LOG4J_PREFIX : base.Prefix; }
-		}
-		#endregion
-
 		/* Example log4j schema event
 
 <log4j:event logger="first logger" level="ERROR" thread="Thread-3" timestamp="1051494121460" xmlns:log4j="http://logging.apache.org/log4j">