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 2013/11/17 10:40:47 UTC

svn commit: r1542672 - in /logging/log4net/trunk/src/log4net: ./ DateFormatter/AbsoluteTimeDateFormatter.cs

Author: bodewig
Date: Sun Nov 17 09:40:47 2013
New Revision: 1542672

URL: http://svn.apache.org/r1542672
Log:
merge fix for LOG4NET-376 from 1.2.x branch

Modified:
    logging/log4net/trunk/src/log4net/   (props changed)
    logging/log4net/trunk/src/log4net/DateFormatter/AbsoluteTimeDateFormatter.cs

Propchange: logging/log4net/trunk/src/log4net/
------------------------------------------------------------------------------
  Merged /logging/log4net/branches/log4net-1.2.x/src:r1542664

Modified: logging/log4net/trunk/src/log4net/DateFormatter/AbsoluteTimeDateFormatter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net/DateFormatter/AbsoluteTimeDateFormatter.cs?rev=1542672&r1=1542671&r2=1542672&view=diff
==============================================================================
--- logging/log4net/trunk/src/log4net/DateFormatter/AbsoluteTimeDateFormatter.cs (original)
+++ logging/log4net/trunk/src/log4net/DateFormatter/AbsoluteTimeDateFormatter.cs Sun Nov 17 09:40:47 2013
@@ -101,6 +101,8 @@ namespace log4net.DateFormatter
 		/// </remarks>
 		virtual public void FormatDate(DateTime dateToFormat, TextWriter writer)
 		{
+                    lock (s_lastTimeStrings)
+		    {
 			// Calculate the current time precise only to the second
 			long currentTimeToTheSecond = (dateToFormat.Ticks - (dateToFormat.Ticks % TimeSpan.TicksPerSecond));
 
@@ -158,6 +160,7 @@ namespace log4net.DateFormatter
 				writer.Write('0');
 			}
 			writer.Write(millis);
+                    }
 		}
 
 		#endregion Implementation of IDateFormatter