diff options
author | Arnold Dumas <arnold@dumas.at> | 2017-02-02 20:50:44 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-03 10:54:53 +0000 |
commit | b3a11c8f4f307bbbb597c9c6e7e61ee93e794873 (patch) | |
tree | e36db538926a923d4da136ef48a00a1622a7b648 /include/sal | |
parent | 29337650a379d1bcfe28bc41182254935f77cacc (diff) |
tdf#91872: Make SAL_INFO and friends more efficient
Change-Id: I8a5b1665660b0679439f07d3924bb90cb4c4075c
Reviewed-on: https://gerrit.libreoffice.org/33848
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/sal')
-rw-r--r-- | include/sal/log.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/sal/log.hxx b/include/sal/log.hxx index 4438ec559fae..ea070dd68d4e 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -34,6 +34,9 @@ extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log_backtrace( enum sal_detail_LogLevel level, char const * area, char const * where, char const * message, int maxNoStackFramesToDisplay); +extern "C" SAL_DLLPUBLIC int SAL_CALL sal_detail_log_report( + enum sal_detail_LogLevel level, char const * area); + namespace sal { namespace detail { inline void SAL_CALL log( @@ -116,7 +119,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) { #define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \ do { \ - if (condition) { \ + if ((condition) && sal_detail_log_report(level, area)) { \ if (sizeof ::sal::detail::getResult( \ ::sal::detail::StreamStart() << stream) == 1) \ { \ |