diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-10-26 14:13:10 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-12-02 16:47:16 +0000 |
commit | 94427a1b000344b24948374953a099571901a2ed (patch) | |
tree | e5a7551267810f07c884f276b47991109bd118c8 /sal/osl/all | |
parent | 08e5fc257fa8c106be34bb034ebe5e00b6fcf711 (diff) |
sal: add SAL_DEBUG_TRACE debugging API for Windows, with UNX stub.
Change-Id: I2fdbc2ac10f483eee154bdf69479ba217a91ef7f
Reviewed-on: https://gerrit.libreoffice.org/19605
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sal/osl/all')
-rw-r--r-- | sal/osl/all/log.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index 994169aa58b0..a343403490bd 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -25,6 +25,7 @@ #include "sal/detail/log.h" #include "sal/log.hxx" #include "sal/types.h" +#include "internal/misc.hxx" #include "logformat.hxx" @@ -70,6 +71,7 @@ char const * toString(sal_detail_LogLevel level) { case SAL_DETAIL_LOG_LEVEL_WARN: return "warn"; case SAL_DETAIL_LOG_LEVEL_DEBUG: + case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE: return "debug"; } } @@ -199,7 +201,14 @@ void log( + (std::strncmp(where, SRCDIR "/", nStrLen) == 0 ? nStrLen : 0)); } - s << message << '\n'; + + s << message; + if (level == SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE) { + s << " at:\n"; + s << OUString(osl_backtraceAsString(), SAL_NO_ACQUIRE); + } + s << '\n'; + #if defined ANDROID int android_log_level; switch (level) { |