Merge pull request #332 from Organic-Code/enhancement/spdlog

Adding spdlog
This commit is contained in:
Alex
2019-05-20 12:07:58 +02:00
committed by GitHub
21 changed files with 89 additions and 69 deletions

View File

@ -1,6 +1,5 @@
#include "modules/sni/watcher.hpp"
#include <iostream>
#include <spdlog/spdlog.h>
using namespace waybar::modules::SNI;
@ -35,7 +34,7 @@ void Watcher::busAcquired(const Glib::RefPtr<Gio::DBus::Connection>& conn, Glib:
if (error != nullptr) {
// Don't print an error when a watcher is already present
if (error->code != 2) {
std::cerr << error->message << std::endl;
spdlog::error("Watcher {}: {}", watcher_id_, error->message);
}
g_error_free(error);
return;
@ -194,4 +193,4 @@ void Watcher::updateRegisteredItems(SnWatcher* obj) {
sn_watcher_set_registered_items(obj, items);
g_variant_unref(variant);
g_free(items);
}
}