diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 15:54:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-08 17:27:26 +0000 |
commit | e61521f6cf0a065d23b420c4007ea224c3070052 (patch) | |
tree | f506779d08e8ce04af91e8512c27f54c50197323 /tools | |
parent | 8228227168a7eb3ebf14629bec87f01536c23970 (diff) |
OSL_TRACE -> SAL in sw..ucb
Change-Id: I18f5511f70232d91095ac8527a6c5883c36294f5
Reviewed-on: https://gerrit.libreoffice.org/31762
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/config.cxx | 24 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 14 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 13 |
3 files changed, 20 insertions, 31 deletions
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index ce8245452e1e..8c801f46d87e 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -661,15 +661,14 @@ Config::Config( const OUString& rFileName ) mnLockCount = 1; #ifdef DBG_UTIL - OString aTraceStr("Config::Config( " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8) + " )"); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::Config( " << maFileName << " )"); #endif } Config::~Config() { #ifdef DBG_UTIL - OSL_TRACE( "Config::~Config()" ); + SAL_INFO("tools", "Config::~Config()" ); #endif Flush(); @@ -810,8 +809,8 @@ OString Config::ReadKey(const OString& rKey) const OString Config::ReadKey(const OString& rKey, const OString& rDefault) const { #ifdef DBG_UTIL - OString aTraceStr("Config::ReadKey( " + rKey + " ) from " + GetGroup() + " in " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::ReadKey( " << rKey << " ) from " << GetGroup() + << " in " << maFileName); #endif // Update config data if necessary @@ -838,8 +837,8 @@ OString Config::ReadKey(const OString& rKey, const OString& rDefault) const void Config::WriteKey(const OString& rKey, const OString& rStr) { #ifdef DBG_UTIL - OString aTraceStr("Config::WriteKey( " + rKey + ", " + rStr + " ) to " + GetGroup() + " in " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::WriteKey( " << rKey << ", " << rStr << " ) to " + << GetGroup() << " in " << maFileName); #endif // Update config data if necessary @@ -941,8 +940,7 @@ void Config::DeleteKey(const OString& rKey) sal_uInt16 Config::GetKeyCount() const { #ifdef DBG_UTIL - OString aTraceStr("Config::GetKeyCount() from " + GetGroup() + " in " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::GetKeyCount() from " << GetGroup() << " in " << maFileName); #endif // Update config data if necessary @@ -970,8 +968,8 @@ sal_uInt16 Config::GetKeyCount() const OString Config::GetKeyName(sal_uInt16 nKey) const { #ifdef DBG_UTIL - OString aTraceStr("Config::GetKeyName( " + OString::number(static_cast<sal_Int32>(nKey)) + " ) from " + GetGroup() + " in " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::GetKeyName( " << OString::number(static_cast<sal_Int32>(nKey)) + << " ) from " << GetGroup() << " in " << maFileName); #endif // search key and return name if found @@ -998,8 +996,8 @@ OString Config::GetKeyName(sal_uInt16 nKey) const OString Config::ReadKey(sal_uInt16 nKey) const { #ifdef DBG_UTIL - OString aTraceStr("Config::ReadKey( " + OString::number(static_cast<sal_Int32>(nKey)) + " ) from " + GetGroup() + " in " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", "Config::ReadKey( " << OString::number(static_cast<sal_Int32>(nKey)) + << " ) from " << GetGroup() << " in " << maFileName); #endif // Search key and return value if found diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index c97f3ab28fed..230eb987d3e2 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -159,13 +159,10 @@ ResMgrContainer& ResMgrContainer::get() ResMgrContainer::~ResMgrContainer() { - for( std::unordered_map< OUString, ContainerElement, OUStringHash >::iterator it = - m_aResFiles.begin(); it != m_aResFiles.end(); ++it ) + for( std::pair< OUString, ContainerElement > const & rPair : m_aResFiles ) { - OSL_TRACE( "Resource file %s loaded %d times", - OUStringToOString( it->second.aFileURL, osl_getThreadTextEncoding() ).getStr(), - it->second.nLoadCount ); - delete it->second.pResMgr; + SAL_INFO("tools", "Resource file " << rPair.second.aFileURL << " loaded " << rPair.second.nLoadCount << " times"); + delete rPair.second.pResMgr; } } @@ -877,8 +874,7 @@ void ResMgr::decStack() if( (rTop.Flags & RCFlags::FALLBACK_DOWN) ) { #if OSL_DEBUG_LEVEL > 1 - OSL_TRACE( "returning from fallback %s", - OUStringToOString(pFallbackResMgr->GetFileName(), osl_getThreadTextEncoding() ).getStr() ); + SAL_INFO("tools", "returning from fallback " << pFallbackResMgr->GetFileName() ); #endif delete pFallbackResMgr; pFallbackResMgr = nullptr; @@ -1241,7 +1237,7 @@ ResMgr* ResMgr::CreateFallbackResMgr( const ResId& rId, const Resource* pResourc ResMgrContainer::get().freeResMgr( pRes ); return nullptr; } - OSL_TRACE( "trying fallback: %s", OUStringToOString( pRes->aFileName, osl_getThreadTextEncoding() ).getStr() ); + SAL_INFO("tools", "trying fallback: " << pRes->aFileName ); pFallback = new ResMgr( pRes ); pFallback->pOriginalResMgr = this; // try to recreate the resource stack diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 66a5e1a77b18..206ec6c57255 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -308,8 +308,7 @@ SvFileStream::~SvFileStream() std::size_t SvFileStream::GetData( void* pData, std::size_t nSize ) { #ifdef DBG_UTIL - OString aTraceStr("SvFileStream::GetData(): " + OString::number(static_cast<sal_Int64>(nSize)) + " Bytes from " + OUStringToOString(aFilename, osl_getThreadTextEncoding())); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", OString::number(static_cast<sal_Int64>(nSize)) << " Bytes from " << aFilename); #endif sal_uInt64 nRead = 0; @@ -328,8 +327,7 @@ std::size_t SvFileStream::GetData( void* pData, std::size_t nSize ) std::size_t SvFileStream::PutData( const void* pData, std::size_t nSize ) { #ifdef DBG_UTIL - OString aTraceStr("SvFileStream::PutData(): " + OString::number(static_cast<sal_Int64>(nSize)) + " Bytes to " + OUStringToOString(aFilename, osl_getThreadTextEncoding())); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", OString::number(static_cast<sal_Int64>(nSize)) << " Bytes to " << aFilename); #endif sal_uInt64 nWrite = 0; @@ -461,9 +459,7 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nOpenMode ) aFilename = rFilename; #ifdef DBG_UTIL - OString aLocalFilename(OUStringToOString(aFilename, osl_getThreadTextEncoding())); - OString aTraceStr("SvFileStream::Open(): " + aLocalFilename); - OSL_TRACE( "%s", aTraceStr.getStr() ); + SAL_INFO("tools", aFilename); #endif OUString aFileURL; @@ -559,8 +555,7 @@ void SvFileStream::Close() if ( IsOpen() ) { #ifdef DBG_UTIL - OString aTraceStr("SvFileStream::Close(): " + OUStringToOString(aFilename, osl_getThreadTextEncoding())); - OSL_TRACE("%s", aTraceStr.getStr()); + SAL_INFO("tools", aFilename); #endif Flush(); |