[Libreoffice-commits] online.git: common/Log.cpp common/Log.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Feb 3 07:05:23 UTC 2017
common/Log.cpp | 2 +-
common/Log.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c22e69e9e6f4b33e7ccdd4d6057e0d92d824b651
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Jan 30 12:39:59 2017 -0500
wsd: correct logging of thread ID in log entries
Change-Id: I10aaeeea8df2757362482a405b7525542d150178
Reviewed-on: https://gerrit.libreoffice.org/33857
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/common/Log.cpp b/common/Log.cpp
index 5defd6b..f4c4589 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -84,7 +84,7 @@ namespace Log
}
Poco::DateTime time;
- snprintf(buffer, 1023, "%s-%.04lu %.2u:%.2u:%.2u.%.6u [ %s ] %s ",
+ snprintf(buffer, 1023, "%s-%.05lu %.2u:%.2u:%.2u.%.6u [ %s ] %s ",
(Source.inited ? Source.id.c_str() : "<shutdown>"),
osTid,
time.hour(), time.minute(), time.second(),
diff --git a/common/Log.hpp b/common/Log.hpp
index 1a47fc6..d8788a2 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -175,7 +175,7 @@ namespace Log
}
}
-#define LOG_BODY_(PRIO, LVL, X) Poco::Message m_(l_.name(), "", Poco::Message::PRIO_##PRIO); char b_[1024]; std::ostringstream oss_(Log::prefix(b_, LVL, m_.getTid()), std::ostringstream::ate); oss_ << std::boolalpha << X << "| " << __FILE__ << ':' << __LINE__; m_.setText(oss_.str()); l_.log(m_);
+#define LOG_BODY_(PRIO, LVL, X) Poco::Message m_(l_.name(), "", Poco::Message::PRIO_##PRIO); char b_[1024]; std::ostringstream oss_(Log::prefix(b_, LVL, m_.getOsTid()), std::ostringstream::ate); oss_ << std::boolalpha << X << "| " << __FILE__ << ':' << __LINE__; m_.setText(oss_.str()); l_.log(m_);
#define LOG_TRC(X) do { auto& l_ = Log::logger(); if (l_.trace()) { LOG_BODY_(TRACE, "TRC", X); } } while (false)
#define LOG_DBG(X) do { auto& l_ = Log::logger(); if (l_.debug()) { LOG_BODY_(DEBUG, "DBG", X); } } while (false)
#define LOG_INF(X) do { auto& l_ = Log::logger(); if (l_.information()) { LOG_BODY_(INFORMATION, "INF", X); } } while (false)
More information about the Libreoffice-commits
mailing list