Adding spdlog

This commit is contained in:
Lucas Lazare
2019-05-18 19:44:45 -04:00
parent 6ffc7ee3b3
commit 51be97f9aa
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;
@ -34,7 +33,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); // FIXME: watcher_id_ is neither actually used nor initialized AFAICT
}
g_error_free(error);
return;
@ -193,4 +192,4 @@ void Watcher::updateRegisteredItems(SnWatcher* obj) {
sn_watcher_set_registered_items(obj, items);
g_variant_unref(variant);
g_free(items);
}
}