Proper logging instead of blindly printing to standard out

This commit is contained in:
loki
2020-01-09 22:02:01 +01:00
parent 3efa34e07d
commit b6fc6f2054
15 changed files with 298 additions and 187 deletions

View File

@@ -2,8 +2,6 @@
// Created by loki on 6/6/19.
//
#include <iostream>
#include <fstream>
#include <thread>
extern "C" {
@@ -225,7 +223,7 @@ void capture_display(packet_queue_t packets, idr_event_t idr_events, config_t co
auto t = std::chrono::steady_clock::now();
if(t > next_snapshot) {
std::cout << "Taking snapshot took "sv << std::chrono::floor<std::chrono::milliseconds>(t - next_snapshot).count() << " milliseconds too long"sv << std::endl;
BOOST_LOG(warning) << "Taking snapshot took "sv << std::chrono::floor<std::chrono::milliseconds>(t - next_snapshot).count() << " milliseconds too long"sv;
}
std::this_thread::sleep_until(next_snapshot);