phase 2
This commit is contained in:
15
tools/topic_watcher.cpp
Normal file
15
tools/topic_watcher.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <softbus_bus/Bus.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
int main()
|
||||
{
|
||||
auto& bus = softbus::bus::Bus::instance();
|
||||
bus.subscribe("#", [](const softbus::bus::BusMessage& msg) {
|
||||
std::cout << "[topic] " << msg.topic << std::endl;
|
||||
});
|
||||
std::cout << "topic_watcher: attach to daemon process is standalone demo only." << std::endl;
|
||||
std::cout << "Use daemon logs or integrate watcher via shared bus in-process." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user