14 lines
468 B
C++
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);
|
|
}
|
|
}
|