diff options
author | Henry Castro <hcastro@collabora.com> | 2024-04-17 09:46:28 -0400 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2024-04-24 10:59:51 +0100 |
commit | 335e29abf75f2167d64edbbed407ee38f8781a5a (patch) | |
tree | fcb14fb78276530abcc37f8f2e9b1cfd8933433e | |
parent | remove-w2ui: remove css (diff) | |
download | online-335e29abf75f2167d64edbbed407ee38f8781a5a.tar.gz online-335e29abf75f2167d64edbbed407ee38f8781a5a.zip |
wsd: add 'name' parameter to the logging framework
Change-Id: Ic8cc82e06200d2c2c8f47e27fd5e3225ca7f6202
Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | common/Log.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/Log.hpp b/common/Log.hpp index b8466c1712..9e21831f38 100644 --- a/common/Log.hpp +++ b/common/Log.hpp @@ -260,13 +260,13 @@ static constexpr std::size_t skipPathPrefix(const char (&s)[N], std::size_t n = #ifdef __ANDROID__ -#define LOG_LOG(LOG, PRIO, LVL, STR) \ +#define LOG_LOG(LOG, NAME, PRIO, LVL, STR) \ ((void)__android_log_print(ANDROID_LOG_DEBUG, "coolwsd", "%s %s", LVL, STR.c_str())) #else -#define LOG_LOG(LOG, PRIO, LVL, STR) \ - LOG.log(Poco::Message(LOG.name(), STR, Poco::Message::PRIO_##PRIO)) +#define LOG_LOG(LOG, NAME, PRIO, LVL, STR) \ + LOG.log(Poco::Message(NAME, STR, Poco::Message::PRIO_##PRIO)) #endif @@ -282,13 +282,13 @@ static constexpr std::size_t skipPathPrefix(const char (&s)[N], std::size_t n = LOG.flush(); \ } while (false) -#define LOG_BODY_(LOG, PRIO, LVL, X, PREFIX, END) \ +#define LOG_BODY_(LOG, PRIO, LVL, X, PREFIX, END) \ char b_[1024]; \ std::ostringstream oss_(Log::prefix<sizeof(b_) - 1>(b_, LVL), std::ostringstream::ate); \ PREFIX(oss_); \ oss_ << std::boolalpha << X; \ END(oss_); \ - LOG_LOG(LOG, PRIO, LVL, oss_.str()) + LOG_LOG(LOG, LOG.name(), PRIO, LVL, oss_.str()) #define LOG_ANY(X) \ char b_[1024]; \ |