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 af...@apache.org on 2007/01/13 19:55:40 UTC
svn commit: r495943 - in /logging/log4cxx/trunk:
include/log4cxx/spi/loggingevent.h src/loggingevent.cpp
Author: afester
Date: Sat Jan 13 10:55:38 2007
New Revision: 495943
URL: http://svn.apache.org/viewvc?view=rev&rev=495943
Log:
LOGCXX-14: removed const to non-const casts
Modified:
logging/log4cxx/trunk/include/log4cxx/spi/loggingevent.h
logging/log4cxx/trunk/src/loggingevent.cpp
Modified: logging/log4cxx/trunk/include/log4cxx/spi/loggingevent.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/include/log4cxx/spi/loggingevent.h?view=diff&rev=495943&r1=495942&r2=495943
==============================================================================
--- logging/log4cxx/trunk/include/log4cxx/spi/loggingevent.h (original)
+++ logging/log4cxx/trunk/include/log4cxx/spi/loggingevent.h Sat Jan 13 10:55:38 2007
@@ -206,10 +206,10 @@
LevelPtr level;
/** The nested diagnostic context (NDC) of logging event. */
- LogString ndc;
+ mutable LogString ndc;
/** The mapped diagnostic context (MDC) of logging event. */
- MDC::Map mdcCopy;
+ mutable MDC::Map mdcCopy;
/**
* A map of String keys and String values.
@@ -221,14 +221,14 @@
* serialized. Thus, a receiving SocketNode will never use it's own
* (incorrect) NDC. See also writeObject method.
*/
- bool ndcLookupRequired;
+ mutable bool ndcLookupRequired;
/**
* Have we tried to do an MDC lookup? If we did, there is no need to do it
* again. Note that its value is always false when serialized. See also
* the getMDC and getMDCCopy methods.
*/
- bool mdcCopyLookupRequired;
+ mutable bool mdcCopyLookupRequired;
/** The application supplied message of logging event. */
LogString message;
Modified: logging/log4cxx/trunk/src/loggingevent.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/loggingevent.cpp?view=diff&rev=495943&r1=495942&r2=495943
==============================================================================
--- logging/log4cxx/trunk/src/loggingevent.cpp (original)
+++ logging/log4cxx/trunk/src/loggingevent.cpp Sat Jan 13 10:55:38 2007
@@ -89,8 +89,8 @@
{
if(ndcLookupRequired)
{
- ((LoggingEvent *)this)->ndcLookupRequired = false;
- ((LoggingEvent *)this)->ndc = NDC::get();
+ ndcLookupRequired = false;
+ ndc = NDC::get();
}
return ndc;
@@ -148,9 +148,9 @@
{
if(mdcCopyLookupRequired)
{
- ((LoggingEvent *)this)->mdcCopyLookupRequired = false;
+ mdcCopyLookupRequired = false;
// the clone call is required for asynchronous logging.
- ((LoggingEvent *)this)->mdcCopy = ThreadSpecificData::getCurrentThreadMap();
+ mdcCopy = ThreadSpecificData::getCurrentThreadMap();
}
}