summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-10-13 15:52:28 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-10-13 17:40:45 +0200
commite3418e9a8544054cb7ac87e57cff54afd4ab03a1 (patch)
tree885527801ec7b879be51f12ccfb1e2197bac6bad /sal
parente74fc93e4aba7887e6a278cc44c4bc0962471065 (diff)
use consistently sal.osl and sal.rtl as log areas
Change-Id: Ib5e606283d3d37c38e9729c79c4531807a1419d3
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/osl/file.hxx18
-rw-r--r--sal/inc/sal/log-areas.dox6
-rw-r--r--sal/osl/unx/conditn.cxx38
-rw-r--r--sal/osl/unx/process.cxx8
-rw-r--r--sal/qa/osl/security/osl_Security.cxx2
-rw-r--r--sal/rtl/source/alloc_arena.cxx12
-rw-r--r--sal/rtl/source/alloc_cache.cxx14
-rw-r--r--sal/rtl/source/alloc_global.cxx8
-rw-r--r--sal/rtl/source/logfile.cxx4
9 files changed, 58 insertions, 52 deletions
diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx
index 3d541a98e539..6b9522d46bb4 100644
--- a/sal/inc/osl/file.hxx
+++ b/sal/inc/osl/file.hxx
@@ -732,7 +732,7 @@ public:
inline Type getFileType() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_Type), "sal",
+ !isValid(osl_FileStatus_Mask_Type), "sal.osl",
"no FileStatus Type determined");
return isValid(osl_FileStatus_Mask_Type)
? static_cast< Type >(_aStatus.eType) : Unknown;
@@ -789,7 +789,7 @@ public:
inline sal_uInt64 getAttributes() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_Attributes), "sal",
+ !isValid(osl_FileStatus_Mask_Attributes), "sal.osl",
"no FileStatus Attributes determined");
return _aStatus.uAttributes;
}
@@ -804,7 +804,7 @@ public:
inline TimeValue getCreationTime() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_CreationTime), "sal",
+ !isValid(osl_FileStatus_Mask_CreationTime), "sal.osl",
"no FileStatus CreationTime determined");
return _aStatus.aCreationTime;
}
@@ -819,7 +819,7 @@ public:
inline TimeValue getAccessTime() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_AccessTime), "sal",
+ !isValid(osl_FileStatus_Mask_AccessTime), "sal.osl",
"no FileStatus AccessTime determined");
return _aStatus.aAccessTime;
}
@@ -834,7 +834,7 @@ public:
inline TimeValue getModifyTime() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_ModifyTime), "sal",
+ !isValid(osl_FileStatus_Mask_ModifyTime), "sal.osl",
"no FileStatus ModifyTime determined");
return _aStatus.aModifyTime;
}
@@ -848,7 +848,7 @@ public:
inline sal_uInt64 getFileSize() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_FileSize), "sal",
+ !isValid(osl_FileStatus_Mask_FileSize), "sal.osl",
"no FileStatus FileSize determined");
return _aStatus.uFileSize;
}
@@ -862,7 +862,7 @@ public:
inline ::rtl::OUString getFileName() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_FileName), "sal",
+ !isValid(osl_FileStatus_Mask_FileName), "sal.osl",
"no FileStatus FileName determined");
return isValid(osl_FileStatus_Mask_FileName)
? rtl::OUString(_aStatus.ustrFileName) : rtl::OUString();
@@ -879,7 +879,7 @@ public:
inline ::rtl::OUString getFileURL() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_FileURL), "sal",
+ !isValid(osl_FileStatus_Mask_FileURL), "sal.osl",
"no FileStatus FileURL determined");
return isValid(osl_FileStatus_Mask_FileURL)
? rtl::OUString(_aStatus.ustrFileURL) : rtl::OUString();
@@ -895,7 +895,7 @@ public:
inline ::rtl::OUString getLinkTargetURL() const
{
SAL_INFO_IF(
- !isValid(osl_FileStatus_Mask_LinkTargetURL), "sal",
+ !isValid(osl_FileStatus_Mask_LinkTargetURL), "sal.osl",
"no FileStatus LinkTargetURL determined");
return isValid(osl_FileStatus_Mask_LinkTargetURL)
? rtl::OUString(_aStatus.ustrLinkTargetURL) : rtl::OUString();
diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index 68961485329d..3dde06adaf55 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -15,6 +15,12 @@ Please keep all entries sorted.
This list should give you an overview of which areas to enable when debugging
certain functionality.
+@section SAL
+
+@li @c sal.debug - SAL debugging functionality
+@li @c sal.osl - SAL OSL library
+@li @c sal.rtl - SAL RTL library
+@li @c sal.textenc - the textencoding SAL library
@section Calc
diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx
index c6417bfb2f7a..c3fe130293e8 100644
--- a/sal/osl/unx/conditn.cxx
+++ b/sal/osl/unx/conditn.cxx
@@ -58,7 +58,7 @@ oslCondition SAL_CALL osl_createCondition()
if ( pCond == 0 )
{
- SAL_WARN("sal", "std::bad_alloc in C");
+ SAL_WARN("sal.osl", "std::bad_alloc in C");
return 0;
}
@@ -69,7 +69,7 @@ oslCondition SAL_CALL osl_createCondition()
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_cond_init failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
@@ -81,13 +81,13 @@ oslCondition SAL_CALL osl_createCondition()
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_mutex_init failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
nRet = pthread_cond_destroy(&pCond->m_Condition);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_cond_destroy failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
@@ -112,12 +112,12 @@ void SAL_CALL osl_destroyCondition(oslCondition Condition)
nRet = pthread_cond_destroy(&pCond->m_Condition);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_cond_destroy failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
nRet = pthread_mutex_destroy(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_destroy failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
@@ -147,7 +147,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_mutex_lock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
return sal_False;
@@ -158,7 +158,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_cond_broadcast failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
return sal_False;
@@ -168,7 +168,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
return sal_False;
@@ -199,7 +199,7 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_mutex_lock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
return sal_False;
@@ -211,7 +211,7 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
if ( nRet != 0 )
{
SAL_WARN(
- "sal", "pthread_mutex_unlock failed, errno " << nRet <<", \""
+ "sal.osl", "pthread_mutex_unlock failed, errno " << nRet <<", \""
<< strerror(nRet) << '"');
return sal_False;
}
@@ -240,7 +240,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
if ( nRet != 0 )
{
SAL_WARN(
- "sal", "pthread_mutex_lock failed, errno " << nRet <<", \""
+ "sal.osl", "pthread_mutex_lock failed, errno " << nRet <<", \""
<< strerror(nRet) << '"');
return osl_cond_result_error;
}
@@ -269,7 +269,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
Result = osl_cond_result_timeout;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet
<< ", \"" << strerror(nRet) << '"');
@@ -280,7 +280,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
Result = osl_cond_result_error;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet
<< ", \"" << strerror(nRet) << '"');
return Result;
@@ -298,13 +298,13 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
if ( nRet != 0 )
{
SAL_WARN(
- "sal",
+ "sal.osl",
"pthread_cond_wait failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
Result = osl_cond_result_error;
nRet = pthread_mutex_unlock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
@@ -315,7 +315,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
nRet = pthread_mutex_unlock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
@@ -341,7 +341,7 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
nRet = pthread_mutex_lock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_lock failed, errno " << nRet << ", \"" << strerror(nRet)
<< '"');
@@ -349,7 +349,7 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
nRet = pthread_mutex_unlock(&pCond->m_Lock);
SAL_WARN_IF(
- nRet != 0, "sal",
+ nRet != 0, "sal.osl",
"pthread_mutex_unlock failed, errno " << nRet << ", \""
<< strerror(nRet) << '"');
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index eb1fdf4a98f2..c36e71ff7b5f 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -243,7 +243,7 @@ static void ChildStatusProc(void *pData)
if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1)
{
status = errno;
- SAL_WARN("sal", "executeProcess socketpair() errno " << status);
+ SAL_WARN("sal.osl", "executeProcess socketpair() errno " << status);
}
fcntl(channel[0], F_SETFD, FD_CLOEXEC);
@@ -254,21 +254,21 @@ static void ChildStatusProc(void *pData)
{
status = errno;
assert(status != 0);
- SAL_WARN("sal", "executeProcess pipe(stdInput) errno " << status);
+ SAL_WARN("sal.osl", "executeProcess pipe(stdInput) errno " << status);
}
if ( status == 0 && data.m_pOutputRead && pipe( stdOutput ) == -1 )
{
status = errno;
assert(status != 0);
- SAL_WARN("sal", "executeProcess pipe(stdOutput) errno " << status);
+ SAL_WARN("sal.osl", "executeProcess pipe(stdOutput) errno " << status);
}
if ( status == 0 && data.m_pErrorRead && pipe( stdError ) == -1 )
{
status = errno;
assert(status != 0);
- SAL_WARN("sal", "executeProcess pipe(stdError) errno " << status);
+ SAL_WARN("sal.osl", "executeProcess pipe(stdError) errno " << status);
}
if ( (status == 0) && ((pid = fork()) == 0) )
diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx
index 2368de37be19..7c20638e3177 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -642,7 +642,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
continue;
if( argsCount >= 3 )
{
- SAL_WARN( "sal", "Too many test arguments" );
+ SAL_WARN( "sal.osl", "Too many test arguments" );
continue;
}
args[ argsCount++ ] = arg;
diff --git a/sal/rtl/source/alloc_arena.cxx b/sal/rtl/source/alloc_arena.cxx
index fe066df22620..ce3c1565e0f8 100644
--- a/sal/rtl/source/alloc_arena.cxx
+++ b/sal/rtl/source/alloc_arena.cxx
@@ -322,7 +322,7 @@ rtl_arena_hash_rescale (
old_size = arena->m_hash_size;
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_arena_hash_rescale(" << arena->m_name << "): nseg: "
// << (arena->m_stats.m_alloc - arena->m_stats.m_free) << " (ave: "
// << ((arena->m_stats.m_alloc - arena->m_stats.m_free)
@@ -804,7 +804,7 @@ rtl_arena_deactivate (
/* check for leaked segments */
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_arena_deactivate(" << arena->m_name << "): allocs: "
// << arena->m_stats.m_alloc << ", frees: " << arena->m_stats.m_free
// << "; total: " << arena->m_stats.m_mem_total << ", used: "
@@ -814,7 +814,7 @@ rtl_arena_deactivate (
sal_Size i, n;
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_arena_deactivate(" << arena->m_name << "): cleaning up "
// << (arena->m_stats.m_alloc - arena->m_stats.m_free)
// << " leaked segment(s) [" << arena->m_stats.m_mem_alloc
@@ -1308,7 +1308,7 @@ rtl_arena_init()
);
assert(gp_arena_arena != 0);
}
- // SAL_INFO("sal", "rtl_arena_init completed");
+ // SAL_INFO("sal.rtl", "rtl_arena_init completed");
}
/* ================================================================= */
@@ -1326,7 +1326,7 @@ rtl_arena_fini()
for (arena = head->m_arena_next; arena != head; arena = arena->m_arena_next)
{
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_arena_fini(" << arena->m_name << "): allocs: "
// << arena->m_stats.m_alloc << ", frees: "
// << arena->m_stats.m_free << "; total: "
@@ -1335,7 +1335,7 @@ rtl_arena_fini()
}
RTL_MEMORY_LOCK_RELEASE(&(g_arena_list.m_lock));
}
- // SAL_INFO("sal", "rtl_arena_fini completed");
+ // SAL_INFO("sal.rtl", "rtl_arena_fini completed");
}
/* ================================================================= */
diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx
index a29b0785eba0..4d8000bd452d 100644
--- a/sal/rtl/source/alloc_cache.cxx
+++ b/sal/rtl/source/alloc_cache.cxx
@@ -130,7 +130,7 @@ rtl_cache_hash_rescale (
old_size = cache->m_hash_size;
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_cache_hash_rescale(" << cache->m_name << "): nbuf: "
// << (cache->m_slab_stats.m_alloc - cache->m_slab_stats.m_free)
// << " (ave: "
@@ -994,7 +994,7 @@ rtl_cache_deactivate (
}
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_cache_deactivate(" << cache->m_name << "): [slab]: allocs: "
// << cache->m_slab_stats.m_alloc << ", frees: "
// << cache->m_slab_stats.m_free << "; total: "
@@ -1010,7 +1010,7 @@ rtl_cache_deactivate (
if (cache->m_slab_stats.m_alloc > cache->m_slab_stats.m_free)
{
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_cache_deactivate(" << cache->m_name << "): cleaning up "
// << (cache->m_slab_stats.m_alloc - cache->m_slab_stats.m_free)
// << " leaked buffer(s) [" << cache->m_slab_stats.m_mem_alloc
@@ -1501,7 +1501,7 @@ rtl_cache_wsupdate (
RTL_MEMORY_LOCK_ACQUIRE(&(cache->m_depot_lock));
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_cache_wsupdate(" << cache->m_name
// << ") [depot: count, curr_min, prev_min] full: "
// << cache->m_depot_full.m_mag_count << ", "
@@ -1653,7 +1653,7 @@ rtl_cache_init()
}
rtl_cache_wsupdate_init();
- // SAL_INFO("sal", "rtl_cache_init completed");
+ // SAL_INFO("sal.rtl", "rtl_cache_init completed");
}
/* ================================================================= */
@@ -1696,7 +1696,7 @@ rtl_cache_fini()
for (cache = head->m_cache_next; cache != head; cache = cache->m_cache_next)
{
// SAL_INFO(
- // "sal",
+ // "sal.rtl",
// "rtl_cache_fini(" << cache->m_name << ") [slab]: allocs: "
// << cache->m_slab_stats.m_alloc << ", frees: "
// << cache->m_slab_stats.m_free << "; total: "
@@ -1712,7 +1712,7 @@ rtl_cache_fini()
}
RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
}
- // SAL_INFO("sal", "rtl_cache_fini completed");
+ // SAL_INFO("sal.rtl", "rtl_cache_fini completed");
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/rtl/source/alloc_global.cxx b/sal/rtl/source/alloc_global.cxx
index 7ac963c1cf2b..4e9a45bbe1df 100644
--- a/sal/rtl/source/alloc_global.cxx
+++ b/sal/rtl/source/alloc_global.cxx
@@ -234,7 +234,7 @@ void rtl_memory_init()
}
}
#endif
- // SAL_INFO("sal", "rtl_memory_init completed");
+ // SAL_INFO("sal.rtl", "rtl_memory_init completed");
}
/* ================================================================= */
@@ -264,7 +264,7 @@ void rtl_memory_fini()
gp_alloc_arena = 0;
}
#endif
- // SAL_INFO("sal", "rtl_memory_fini completed");
+ // SAL_INFO("sal.rtl", "rtl_memory_fini completed");
}
/* ================================================================= *
@@ -297,7 +297,7 @@ void * SAL_CALL rtl_reallocateMemory_SYSTEM (void * p, sal_Size n)
void* SAL_CALL rtl_allocateMemory (sal_Size n) SAL_THROW_EXTERN_C()
{
SAL_WARN_IF(
- n >= SAL_MAX_INT32, "sal",
+ n >= SAL_MAX_INT32, "sal.rtl",
"suspicious massive alloc " << n);
#if !defined(FORCE_SYSALLOC)
while (1)
@@ -320,7 +320,7 @@ void* SAL_CALL rtl_allocateMemory (sal_Size n) SAL_THROW_EXTERN_C()
void* SAL_CALL rtl_reallocateMemory (void * p, sal_Size n) SAL_THROW_EXTERN_C()
{
SAL_WARN_IF(
- n >= SAL_MAX_INT32, "sal",
+ n >= SAL_MAX_INT32, "sal.rtl",
"suspicious massive alloc " << n);
#if !defined(FORCE_SYSALLOC)
while (1)
diff --git a/sal/rtl/source/logfile.cxx b/sal/rtl/source/logfile.cxx
index 73215e0f2960..eca7fa6b1124 100644
--- a/sal/rtl/source/logfile.cxx
+++ b/sal/rtl/source/logfile.cxx
@@ -106,7 +106,7 @@ OUString getFileUrl( const OUString &name )
!= osl_File_E_None )
{
SAL_WARN(
- "sal", "osl_getFileURLFromSystemPath failed for \"" << name << '"');
+ "sal.rtl", "osl_getFileURLFromSystemPath failed for \"" << name << '"');
}
OUString aWorkingDirectory;
@@ -182,7 +182,7 @@ void init() {
else
{
SAL_WARN(
- "sal",
+ "sal.rtl",
"Couldn't open logfile " << o << '(' << +e << ')');
}
}