Skip to content

Commit 3aa283c

Browse files
authored
Flush buffer only when it matches verbosity (#122)
1 parent 13b03e4 commit 3aa283c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Monitoring.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ void Monitoring::flushBuffer() {
6060

6161
void Monitoring::flushBuffer(const short index)
6262
{
63-
transmit(std::move(mStorage[index]));
64-
mStorage[index].clear();
63+
for (auto& backend : mBackends) {
64+
if (matchVerbosity(backend->getVerbosity(), static_cast<Verbosity>(index))) {
65+
backend->send(std::move(mStorage[index]));
66+
mStorage[index].clear();
67+
}
68+
}
6569
}
6670

6771
void Monitoring::enableProcessMonitoring(const unsigned int interval) {

0 commit comments

Comments
 (0)