You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ts...@apache.org on 2014/01/29 15:48:11 UTC

svn commit: r1562465 - /incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp

Author: tschoening
Date: Wed Jan 29 14:48:11 2014
New Revision: 1562465

URL: http://svn.apache.org/r1562465
Log:
LOG4CXX-420: Improved comment

Modified:
    incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp

Modified: incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp
URL: http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp?rev=1562465&r1=1562464&r2=1562465&view=diff
==============================================================================
--- incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp (original)
+++ incubator/log4cxx/trunk/src/main/cpp/cacheddateformat.cpp Wed Jan 29 14:48:11 2014
@@ -132,8 +132,14 @@ int CachedDateFormat::findMillisecondSta
            LogString plusZero;
            formatter->format(plusZero, slotBegin, pool);
 
-           //   If the next 3 characters match the magic
-           //      strings and the remaining fragments are identical
+           // If the next 1..3 characters match the magic strings, depending on if the currently
+           // used millis overlap with the magic string, and the remaining fragments are identical.
+           //
+           // LOG4CXX-420:
+           // pattern:		%d{yyyy-MM-dd HH:mm:ss,SSS}
+           // formatted:	2010-08-12 11:04:50,609
+           // plusMagic:	2010-08-12 11:04:50,654
+           // plusZero:		2010-08-12 11:04:50,000
            if (plusZero.length() == formatted.length()
               && regionMatches(magicString, magicString.length() - (plusMagic.length() - i), plusMagic, i, plusMagic.length() - i)
               && regionMatches(formattedMillis, formattedMillis.length() - (formatted.length() - i), formatted, i, formatted.length() - i)