From ef1d096ddc311a2fd821d4076421c4a8f8d63abf Mon Sep 17 00:00:00 2001 From: Radu Ioan Date: Wed, 6 Feb 2013 00:10:23 +0200 Subject: fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT - replaced osl_trace with sal_info - added new log areas to log-area.dox Change-Id: Ib47c4b4c9604bca1f8a635dd01bb89702b47b591 Reviewed-on: https://gerrit.libreoffice.org/2010 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens --- stoc/source/corereflection/lrucache.hxx | 21 +++++++++++---------- stoc/source/tdmanager/lrucache.hxx | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 20 deletions(-) (limited to 'stoc/source') 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 #include "rtl/ustring.hxx" +#include "sal/log.hxx" #include @@ -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 #include "rtl/ustring.hxx" +#include "sal/log.hxx" #include @@ -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 } -- cgit