diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-04-03 17:14:43 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-03 18:16:38 +0200 |
commit | f46775a206589fb9486833ae2e043731cb6be54f (patch) | |
tree | 8ef070fe4e6b1cb8a66fd02bd22b1c515ba2f9eb /sal/osl | |
parent | fdo#45182 fix RTF import of character encoding in footnotes (diff) | |
download | core-f46775a206589fb9486833ae2e043731cb6be54f.tar.gz core-f46775a206589fb9486833ae2e043731cb6be54f.zip |
SAL_DEBUG(), instead of those temporary debug printf's
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/all/log.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index 6e7009a82b3d..43d704541a0b 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -77,10 +77,14 @@ char const * toString(sal_detail_LogLevel level) { return "info"; case SAL_DETAIL_LOG_LEVEL_WARN: return "warn"; + case SAL_DETAIL_LOG_LEVEL_DEBUG: + return "debug"; } } bool report(sal_detail_LogLevel level, char const * area) { + if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) + return true; assert(area != 0); char const * env = std::getenv("SAL_LOG"); if (env == 0) { @@ -152,9 +156,12 @@ void log( char const * message) { std::ostringstream s; - s << toString(level) << ':' << area << ':' << OSL_DETAIL_GETPID << ':' - << osl::Thread::getCurrentIdentifier() << ':' << where << message - << '\n'; + if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) + s << toString(level) << ':' << /*no where*/' ' << message << '\n'; + else + s << toString(level) << ':' << area << ':' << OSL_DETAIL_GETPID << ':' + << osl::Thread::getCurrentIdentifier() << ':' << where << message + << '\n'; std::fputs(s.str().c_str(), stderr); } |