SmartLockerTools/Analyser/CategoryLogSinkBackend.cpp
2024-06-13 15:41:40 +08:00

14 lines
468 B
C++

#include "CategoryLogSinkBackend.h"
#include "BoostLog.h"
CategoryLogSinkBackend::CategoryLogSinkBackend(const std::string &category, Append &&append)
: m_category(category), m_append(std::move(append)) {
}
void CategoryLogSinkBackend::consume(const boost::log::record_view &record, string_type const &output) {
auto &&category = record[AmassKeywords::category];
if ((category == m_category) && m_append) {
m_append(output);
}
}