summaryrefslogtreecommitdiff
path: root/include/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-09 10:35:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-09 10:35:20 +0100
commit8458ec8c9c93c8b3a6045c2b45cecadd345bbf4d (patch)
tree64ebfba454e67dd38d98c41a89496f305f298fdf /include/sal
parentcff6cdb2ee37e836b9bab39500d24fcedc360121 (diff)
Fix SAL_DEBUG_BACKTRACE
...after 56d071c10ca8016848f1f059aa3eb197fe928844 "rename SAL_DEBUG_TRACE to SAL_DEBUG_BACKTRACE" (looks like this doesn't get used much...)
Diffstat (limited to 'include/sal')
-rw-r--r--include/sal/log.hxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index ea070dd68d4e..b383fd030535 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -54,6 +54,14 @@ inline void SAL_CALL log(
sal_detail_log(level, area, where, stream.str().c_str());
}
+inline void SAL_CALL log_backtrace(
+ sal_detail_LogLevel level, char const * area, char const * where,
+ std::ostringstream const & stream, int maxNoStackFramesToDisplay)
+{
+ sal_detail_log_backtrace(
+ level, area, where, stream.str().c_str(), maxNoStackFramesToDisplay);
+}
+
// Special handling of the common case where the message consists of just a
// string literal, to produce smaller call-site code:
@@ -357,12 +365,14 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
::sal_detail_log_backtrace( \
::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, \
::sal::detail::unwrapStream( \
- ::sal::detail::StreamStart() << stream)); \
+ ::sal::detail::StreamStart() << stream), \
+ maxNoStackFramesToDisplay); \
} else { \
::std::ostringstream sal_detail_stream; \
sal_detail_stream << stream; \
- ::sal::detail::log( \
- ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, sal_detail_stream); \
+ ::sal::detail::log_backtrace( \
+ ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, sal_detail_stream, \
+ maxNoStackFramesToDisplay); \
} \
} while (false)