logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpsen...@apache.org
Subject svn commit: r1483378 - /logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs
Date Thu, 16 May 2013 14:07:58 GMT
Author: dpsenner
Date: Thu May 16 14:07:58 2013
New Revision: 1483378

URL: http://svn.apache.org/r1483378
Log:
LOG4NET-376 extended the lock around s_lastTimeStrings in AbsoluteTimeDateFormatter

This fix should prevent obstructed output in multithreaded environments.

Modified:
    logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs

Modified: logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs?rev=1483378&r1=1483377&r2=1483378&view=diff
==============================================================================
--- logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs (original)
+++ logging/log4net/trunk/src/DateFormatter/AbsoluteTimeDateFormatter.cs Thu May 16 14:07:58
2013
@@ -152,20 +152,20 @@ namespace log4net.DateFormatter
 					}
 				}
 				writer.Write(timeString);
+				
+				// Append the current millisecond info
+				writer.Write(',');
+				int millis = dateToFormat.Millisecond;
+				if (millis < 100)
+				{
+					writer.Write('0');
+				}
+				if (millis < 10)
+				{
+					writer.Write('0');
+				}
+				writer.Write(millis);
 			}
-			
-			// Append the current millisecond info
-			writer.Write(',');
-			int millis = dateToFormat.Millisecond;
-			if (millis < 100)
-			{
-				writer.Write('0');
-			}
-			if (millis < 10)
-			{
-				writer.Write('0');
-			}
-			writer.Write(millis);
 		}
 
 		#endregion Implementation of IDateFormatter



Mime
View raw message