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 /include/sal | |
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 'include/sal')
-rw-r--r-- | include/sal/detail/log.h | 1 | ||||
-rw-r--r-- | include/sal/log.hxx | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/sal/detail/log.h b/include/sal/detail/log.h index 11ece36c3279..ab9718518646 100644 --- a/include/sal/detail/log.h +++ b/include/sal/detail/log.h @@ -52,6 +52,7 @@ extern "C" { enum sal_detail_LogLevel { SAL_DETAIL_LOG_LEVEL_INFO, SAL_DETAIL_LOG_LEVEL_WARN, + SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE = SAL_MAX_ENUM - 1, SAL_DETAIL_LOG_LEVEL_DEBUG = SAL_MAX_ENUM }; diff --git a/include/sal/log.hxx b/include/sal/log.hxx index aefcdd1f7f5f..e01d70870042 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -316,6 +316,18 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) { SAL_DETAIL_LOG_STREAM( \ SAL_LOG_TRUE, ::SAL_DETAIL_LOG_LEVEL_DEBUG, NULL, NULL, stream) +/** + Produce temporary debugging output from stream along with a + stack trace of the calling location. This macro is meant to + be used only while working on code and should never exist + in production code. + + See @ref sal_log "basic logging functionality" for details. +*/ +#define SAL_DEBUG_TRACE(stream) \ + SAL_DETAIL_LOG_STREAM( \ + SAL_LOG_TRUE, ::SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE, NULL, NULL, stream) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |