summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-02-06 00:10:23 +0200
committerThorsten Behrens <tbehrens@suse.com>2013-02-19 16:02:40 +0000
commitef1d096ddc311a2fd821d4076421c4a8f8d63abf (patch)
tree5736a7b4193228c621a4a51b1dc713ec9b932ded /stoc
parenta09f11715be53587ee2b0368e19f45cc85fb6cf1 (diff)
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 <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/corereflection/lrucache.hxx21
-rw-r--r--stoc/source/tdmanager/lrucache.hxx21
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
}