Separating out into DataSink CRTP model. Removed SmartStreams

This commit is contained in:
NaifBanana
2026-01-27 22:25:12 -06:00
parent 4c8c622f0b
commit 50e37b8421
5 changed files with 130 additions and 281 deletions
+6 -11
View File
@@ -26,20 +26,15 @@ const ErrorCodeMap TestError::ErrorMessages{
{TestError::ErrorCodes::D, "Doin"}
};
class TestLogger : public nb::LoggerBase<TestLogger> {
public:
using Base = LoggerBase<TestLogger>;
using Base::Base;
virtual void process(const LogEvent& event) {
*_ostreams[0] << event.pid << " : " << event.msg << std::endl;
}
};
TEST(ErrorTest, Test) {
EXPECT_EQ(1, 1);
TestLogger log(std::cout);
nb::DebugLogger log(std::cout);
ASSERT_TRUE(log.run());
log.msg("Hey!");
ASSERT_TRUE(log.isRunning());
while (!log.isRunning()){
1+1;
}
log.log("Hey!");
}