From 1d45c9aecd1e3272d62e0f3afed830b26423ae46 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 3 Jun 2020 22:53:59 -0700 Subject: [PATCH] modules/client/sync: Fix unmatched debuglog message at polylog handler completion. --- modules/client/sync.cc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/client/sync.cc b/modules/client/sync.cc index 78d5a8f7d..729f4af2b 100644 --- a/modules/client/sync.cc +++ b/modules/client/sync.cc @@ -1020,16 +1020,23 @@ try if(!ret) checkpoint.committing(false); - if(!data.phased && stats::info) - log::info - { - log, "request %s polylog commit:%b complete @%ld", - loghead(data), - ret, - data.phased? - data.range.first: - data.range.second - }; + const auto &log_level + { + !data.phased && stats::info? + log::level::INFO: + log::level::DEBUG + }; + + log::logf + { + log, log_level, + "request %s polylog commit:%b complete @%ld", + loghead(data), + ret, + data.phased? + data.range.first: + data.range.second + }; return ret; }