Skip to content

Commit 1c3ac89

Browse files
committed
Do not use MonLogger in examples
1 parent 68a4cfe commit 1c3ac89

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

examples/8-KafkaToHttpServer.cxx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
#include <thread>
1515

1616
#include "../src/Transports/KafkaConsumer.h"
17-
#include "../src/MonLogger.h"
1817
#include "envs.pb.h"
1918

2019
namespace beast = boost::beast;
2120
namespace http = beast::http;
2221
using tcp = boost::asio::ip::tcp;
23-
using o2::monitoring::MonLogger;
2422
using namespace std::literals::string_literals;
2523

2624

@@ -171,11 +169,11 @@ void deserializeActiveRuns(const std::string& lastActiveRunMessage)
171169
aliceo2::envs::ActiveRunsList activeRuns;
172170
activeRuns.ParseFromString(lastActiveRunMessage);
173171
if (activeRuns.activeruns_size() == 0) {
174-
MonLogger::Get() << "Empty active runs" << MonLogger::End();;
172+
std::cout << "Empty active runs" << std::endl;
175173
} else {
176174
for (int i = 0; i < activeRuns.activeruns_size(); i++) {
177-
MonLogger::Get() << "Active run: " << activeRuns.activeruns(i).runnumber() << " ("
178-
<< activeRuns.activeruns(i).environmentid() << ")" << MonLogger::End();
175+
std::cout << "Active run: " << activeRuns.activeruns(i).runnumber() << " ("
176+
<< activeRuns.activeruns(i).environmentid() << ")" << std::endl;
179177
}
180178
}
181179
const std::lock_guard<std::mutex> lock(gEnvAccess);
@@ -193,7 +191,6 @@ int main(int argc, char* argv[]) {
193191
boost::program_options::notify(vm);
194192
unsigned short port = vm["http-port"].as<unsigned short>();
195193

196-
MonLogger::mLoggerSeverity = o2::monitoring::Severity::Debug;
197194
std::cout << "Using Kafka instance: " << vm["kafka-host"].as<std::string>() << ":9092 and HTTP server port: " << port << std::endl;
198195
std::thread webServerThread([&port](){
199196
auto const address = boost::asio::ip::make_address("0.0.0.0");

0 commit comments

Comments
 (0)