Author: bodewig
Date: Tue Oct 18 04:37:36 2016
New Revision: 1765389

URL: http://svn.apache.org/viewvc?rev=1765389&view=rev
Log:
LOG4NET-511 move Flush to AppenderSkeleton

Modified:
    logging/log4net/trunk/src/Appender/AppenderSkeleton.cs
    logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs
    logging/log4net/trunk/src/Appender/DebugAppender.cs
    logging/log4net/trunk/src/Appender/TextWriterAppender.cs
    logging/log4net/trunk/src/Appender/TraceAppender.cs

Modified: logging/log4net/trunk/src/Appender/AppenderSkeleton.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/AppenderSkeleton.cs?rev=1765389&r1=1765388&r2=1765389&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/AppenderSkeleton.cs (original)
+++ logging/log4net/trunk/src/Appender/AppenderSkeleton.cs Tue Oct 18 04:37:36 
2016
@@ -44,7 +44,7 @@ namespace log4net.Appender
        /// </remarks>
        /// <author>Nicko Cadell</author>
        /// <author>Gert Driesen</author>
-       public abstract class AppenderSkeleton : IAppender, IBulkAppender, 
IOptionHandler
+       public abstract class AppenderSkeleton : IAppender, IBulkAppender, 
IOptionHandler, IFlushable
        {
                #region Protected Instance Constructors
 
@@ -782,6 +782,18 @@ namespace log4net.Appender
 
                #endregion
 
+               /// <summary>
+               /// Flushes any buffered log data.
+               /// </summary>
+               /// <remarks>
+               /// This implementation doesn't flush anything and always 
returns false
+               /// </remarks>
+               /// <returns><c>True</c> if all logging events were flushed 
successfully, else <c>false</c>.</returns>
+               public virtual bool Flush(int millisecondsTimeout)
+               {
+                   return false;
+               }
+
                #region Private Instance Fields
 
                /// <summary>

Modified: logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs?rev=1765389&r1=1765388&r2=1765389&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs (original)
+++ logging/log4net/trunk/src/Appender/BufferingAppenderSkeleton.cs Tue Oct 18 
04:37:36 2016
@@ -68,7 +68,7 @@ namespace log4net.Appender
        /// </remarks>
        /// <author>Nicko Cadell</author>
        /// <author>Gert Driesen</author>
-    public abstract class BufferingAppenderSkeleton : AppenderSkeleton, 
IFlushable
+    public abstract class BufferingAppenderSkeleton : AppenderSkeleton
        {
                #region Protected Instance Constructors
 
@@ -266,7 +266,7 @@ namespace log4net.Appender
         /// </summary>
         /// <param name="millisecondsTimeout">The maximum time to wait for 
logging events to be flushed.</param>
         /// <returns><c>True</c> if all logging events were flushed 
successfully, else <c>false</c>.</returns>
-        public virtual bool Flush(int millisecondsTimeout)
+        public override bool Flush(int millisecondsTimeout)
         {
             Flush();
             return true;

Modified: logging/log4net/trunk/src/Appender/DebugAppender.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/DebugAppender.cs?rev=1765389&r1=1765388&r2=1765389&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/DebugAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/DebugAppender.cs Tue Oct 18 04:37:36 2016
@@ -40,10 +40,7 @@ namespace log4net.Appender
        /// </para>
        /// </remarks>
        /// <author>Nicko Cadell</author>
-    public class DebugAppender : AppenderSkeleton
-#if !NETSTANDARD1_3
-                               , IFlushable
-#endif
+       public class DebugAppender : AppenderSkeleton
        {
                #region Public Instance Constructors
 
@@ -111,7 +108,7 @@ namespace log4net.Appender
             /// </summary>
             /// <param name="millisecondsTimeout">The maximum time to wait for 
logging events to be flushed.</param>
             /// <returns><c>True</c> if all logging events were flushed 
successfully, else <c>false</c>.</returns>
-            public bool Flush(int millisecondsTimeout)
+            public override bool Flush(int millisecondsTimeout)
             {
                 // Nothing to do if ImmediateFlush is true
                 if (m_immediateFlush) return true;

Modified: logging/log4net/trunk/src/Appender/TextWriterAppender.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/TextWriterAppender.cs?rev=1765389&r1=1765388&r2=1765389&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/TextWriterAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/TextWriterAppender.cs Tue Oct 18 
04:37:36 2016
@@ -42,7 +42,7 @@ namespace log4net.Appender
        /// <author>Nicko Cadell</author>
        /// <author>Gert Driesen</author>
        /// <author>Douglas de la Torre</author>
-    public class TextWriterAppender : AppenderSkeleton, IFlushable
+    public class TextWriterAppender : AppenderSkeleton
        {
                #region Public Instance Constructors
 
@@ -487,7 +487,7 @@ namespace log4net.Appender
             /// </summary>
             /// <param name="millisecondsTimeout">The maximum time to wait for 
logging events to be flushed.</param>
             /// <returns><c>True</c> if all logging events were flushed 
successfully, else <c>false</c>.</returns>
-            public bool Flush(int millisecondsTimeout)
+            public override bool Flush(int millisecondsTimeout)
             {
                 // Nothing to do if ImmediateFlush is true
                 if (m_immediateFlush) return true;

Modified: logging/log4net/trunk/src/Appender/TraceAppender.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/TraceAppender.cs?rev=1765389&r1=1765388&r2=1765389&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/TraceAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/TraceAppender.cs Tue Oct 18 04:37:36 2016
@@ -51,7 +51,7 @@ namespace log4net.Appender
        /// <author>Nicko Cadell</author>
        /// <author>Gert Driesen</author>
     /// <author>Ron Grabowski</author>
-       public class TraceAppender : AppenderSkeleton, IFlushable
+       public class TraceAppender : AppenderSkeleton
        {
                #region Public Instance Constructors
 
@@ -212,7 +212,7 @@ namespace log4net.Appender
         /// </summary>
         /// <param name="millisecondsTimeout">The maximum time to wait for 
logging events to be flushed.</param>
         /// <returns><c>True</c> if all logging events were flushed 
successfully, else <c>false</c>.</returns>
-        public bool Flush(int millisecondsTimeout)
+        public override bool Flush(int millisecondsTimeout)
         {
             // Nothing to do if ImmediateFlush is true
             if (m_immediateFlush) return true;


Reply via email to