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/9dc49264 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/9dc49264 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/9dc49264 Branch: refs/heads/feature/LOG4NET-586 Commit: 9dc49264761f575709a03bce16c4cac2f2f09c2d Parents: a8925fc Author: Stefan Bodewig <[email protected]> Authored: Fri Jun 1 15:35:49 2018 +0200 Committer: Stefan Bodewig <[email protected]> Committed: Fri Jun 1 15:35:49 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/9dc49264/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/9dc49264/src/Layout/XmlLayoutSchemaLog4jNS.cs ---------------------------------------------------------------------- diff --git a/src/Layout/XmlLayoutSchemaLog4jNS.cs b/src/Layout/XmlLayoutSchemaLog4jNS.cs index 96f35f2..bb725d7 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) { + Namespace = 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">
