Author: bodewig
Date: Wed Sep 14 09:17:30 2011
New Revision: 1170489

URL: http://svn.apache.org/viewvc?rev=1170489&view=rev
Log:
%newline is platform dependent

Modified:
    logging/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs

Modified: logging/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs?rev=1170489&r1=1170488&r2=1170489&view=diff
==============================================================================
--- logging/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs 
(original)
+++ logging/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs Wed Sep 
14 09:17:30 2011
@@ -499,16 +499,17 @@ namespace log4net.Tests.Appender
                        }
                }
 
+        private static readonly int s_Newline_Length = 
Environment.NewLine.Length;
+
                /// <summary>
                /// Returns the number of bytes logged per message, including
-               /// any CR/LF characters in addition to the message length.
+               /// any newline characters in addition to the message length.
                /// </summary>
                /// <param name="sMessage"></param>
                /// <returns></returns>
                private static int TotalMessageLength(string sMessage)
                {
-                       const int iLengthCRLF = 2;
-                       return sMessage.Length + iLengthCRLF;
+            return sMessage.Length + s_Newline_Length;
                }
 
                /// <summary>


Reply via email to