diff options
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/lrucache.hxx | 21 | ||||
-rw-r--r-- | stoc/source/tdmanager/lrucache.hxx | 21 |
2 files changed, 22 insertions, 20 deletions
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx index dbd2573178d3..991fa26d5d4c 100644 --- a/stoc/source/corereflection/lrucache.hxx +++ b/stoc/source/corereflection/lrucache.hxx @@ -24,6 +24,7 @@ #include <osl/mutex.hxx> #include "rtl/ustring.hxx" +#include "sal/log.hxx" #include <boost/unordered_map.hpp> @@ -156,9 +157,9 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( const t CacheEntry * pEntry = (*iFind).second; toFront( pEntry ); #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> retrieved element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" from cache <" ); + SAL_INFO("stoc.corerefl", "> retrieved element \"" ); + SAL_INFO("stoc.corerefl", "" << pEntry->aKey); + SAL_INFO("stoc.corerefl", "\" from cache <" ); #endif return pEntry->aVal; } @@ -181,9 +182,9 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( #ifdef __CACHE_DIAGNOSE if (pEntry->aKey.getLength()) { - OSL_TRACE( "> kicking element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" from cache <" ); + SAL_INFO("stoc.corerefl", "> kicking element \"" ); + SAL_INFO("stoc.corerefl", "" << pEntry->aKey); + SAL_INFO("stoc.corerefl", "\" from cache <" ); } #endif _aKey2Element.erase( pEntry->aKey ); @@ -193,9 +194,9 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( { pEntry = (*iFind).second; #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> replacing element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" in cache <" ); + SAL_INFO("stoc.corerefl", "> replacing element \"" ); + SAL_INFO("stoc.corerefl", "" << pEntry->aKey); + SAL_INFO("stoc.corerefl", "\" in cache <" ); #endif } pEntry->aVal = rValue; @@ -215,7 +216,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear() } _nCachedElements = 0; #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> cleared cache <" ); + SAL_INFO("stoc.corerefl", "> cleared cache <" ); #endif } diff --git a/stoc/source/tdmanager/lrucache.hxx b/stoc/source/tdmanager/lrucache.hxx index 4a9cdf6d57bf..b7a6895a5808 100644 --- a/stoc/source/tdmanager/lrucache.hxx +++ b/stoc/source/tdmanager/lrucache.hxx @@ -24,6 +24,7 @@ #include <osl/mutex.hxx> #include "rtl/ustring.hxx" +#include "sal/log.hxx" #include <boost/unordered_map.hpp> @@ -160,9 +161,9 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( CacheEntry * pEntry = (*iFind).second; toFront( pEntry ); #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> retrieved element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" from cache <" ); + SAL_INFO("stoc.tdmanager", "> retrieved element \"" ); + SAL_INFO("stoc.tdmanager", "" << pEntry->aKey); + SAL_INFO("stoc.tdmanager", "\" from cache <" ); #endif return pEntry->aVal; } @@ -185,9 +186,9 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( #ifdef __CACHE_DIAGNOSE if (pEntry->aKey.getLength()) { - OSL_TRACE( "> kicking element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" from cache <" ); + SAL_INFO("stoc.tdmanager", "> kicking element \"" ); + SAL_INFO("stoc.tdmanager", "" << pEntry->aKey); + SAL_INFO("stoc.tdmanager", "\" from cache <" ); } #endif _aKey2Element.erase( pEntry->aKey ); @@ -197,9 +198,9 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( { pEntry = (*iFind).second; #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> replacing element \"" ); - OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); - OSL_TRACE( "\" in cache <" ); + SAL_INFO("stoc.tdmanager", "> replacing element \"" ); + SAL_INFO("stoc.tdmanager", "" << pEntry->aKey); + SAL_INFO("stoc.tdmanager", "\" in cache <" ); #endif } pEntry->aVal = rValue; @@ -218,7 +219,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::clear() _pBlock[nPos].aVal = t_Val(); } #ifdef __CACHE_DIAGNOSE - OSL_TRACE( "> cleared cache <" ); + SAL_INFO("stoc.tdmanager", "> cleared cache <" ); #endif } |