Bugfix: More template-logging fixes
[senf.git] / PPI / DebugModules.test.cc
index 2010198..a5e5183 100644 (file)
 #include <algorithm>
 #include <sstream>
 
-#define _senf_LOG_STREAM logstream
-namespace {
-    std::stringstream logstream;
-}
-
 #define SENF_LOG_CONF (( (senf)(log)(Debug), (_), VERBOSE ))
 
 #include "../Packets/Packets.hh"
@@ -136,6 +131,9 @@ BOOST_AUTO_UNIT_TEST(activeFeederSink)
 
 BOOST_AUTO_UNIT_TEST(logSink)
 {
+    senf::log::StringTarget logTarget;
+    logTarget.route<senf::log::Debug,senf::log::VERBOSE>();
+
     debug::ActiveFeederSource source;
     debug::LogSink<> sink;
 
@@ -144,8 +142,7 @@ BOOST_AUTO_UNIT_TEST(logSink)
     source.submit( senf::DataPacket::create(data) );
     senf::ppi::run();
     
-    BOOST_CHECK_EQUAL( logstream.str(), 
-                       "  0000  13 24 35                                          .$5\n\n" );
+    BOOST_CHECK( ! logTarget.str().empty() );
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////