[Libreoffice-commits] online.git: common/Log.hpp
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 14 14:52:47 UTC 2020
common/Log.hpp | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 137981f3608ef29287eae4798e9f2880eaf8093b
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Jul 14 16:43:07 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Jul 14 16:52:28 2020 +0200
Add LOG_INF_NOFILE that doesn't display the source file location
Useful (like LOG_TRC_NOFILE) in cases where the source file location
of the LOG_INF call is uninteresting. (Like if the message to be
logged has originated somewhere else.)
Change-Id: Id6d8c137be073a958943f01b3d7b98143fcd7dfd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98735
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/common/Log.hpp b/common/Log.hpp
index b2bb43860..64d215317 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -339,6 +339,16 @@ namespace Log
} \
} while (false)
+#define LOG_INF_NOFILE(X) \
+ do \
+ { \
+ auto& log_ = Log::logger(); \
+ if (log_.information() && !Log::isShutdownCalled()) \
+ { \
+ LOG_BODY_(log_, INFORMATION, "INF", X, false); \
+ } \
+ } while (false)
+
#define LOG_WRN(X) \
do \
{ \
More information about the Libreoffice-commits
mailing list