common/Log.cpp | 2 +- common/Log.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit c22e69e9e6f4b33e7ccdd4d6057e0d92d824b651 Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits