Author: bodewig
Date: Sun Nov 17 09:33:42 2013
New Revision: 1542664

URL: http://svn.apache.org/r1542664
Log:
LOG4NET-376 bring back synchronization accidentially reverted with svn revision 
1486883

Modified:
    
logging/log4net/branches/log4net-1.2.x/src/DateFormatter/AbsoluteTimeDateFormatter.cs

Modified: 
logging/log4net/branches/log4net-1.2.x/src/DateFormatter/AbsoluteTimeDateFormatter.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/DateFormatter/AbsoluteTimeDateFormatter.cs?rev=1542664&r1=1542663&r2=1542664&view=diff
==============================================================================
--- 
logging/log4net/branches/log4net-1.2.x/src/DateFormatter/AbsoluteTimeDateFormatter.cs
 (original)
+++ 
logging/log4net/branches/log4net-1.2.x/src/DateFormatter/AbsoluteTimeDateFormatter.cs
 Sun Nov 17 09:33:42 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));
 
@@ -163,6 +165,7 @@ namespace log4net.DateFormatter
                                writer.Write('0');
                        }
                        writer.Write(millis);
+                    }
                }
 
                #endregion Implementation of IDateFormatter


Reply via email to