Switched to a custom logging lib instead of that spdlog junk

This commit is contained in:
AlexandreRouma
2023-02-25 18:12:34 +01:00
parent 7e80bbd02c
commit 7723d15e8f
154 changed files with 723 additions and 19918 deletions

View File

@ -1,6 +1,6 @@
#include <SoapySDR/Constants.h>
#include <imgui.h>
#include <spdlog/spdlog.h>
#include <utils/flog.h>
#include <module.h>
#include <gui/gui.h>
#include <gui/widgets/stepped_slider.h>
@ -103,12 +103,12 @@ private:
break;
}
}
spdlog::info("Bandwidth for samplerate {0} is {1}", samplerate, cur);
flog::info("Bandwidth for samplerate {0} is {1}", samplerate, cur);
return cur;
}
void selectSampleRate(double samplerate) {
spdlog::info("Setting sample rate to {0}", samplerate);
flog::info("Setting sample rate to {0}", samplerate);
if (sampleRates.size() == 0) {
devId = -1;
return;
@ -287,7 +287,7 @@ private:
static void menuSelected(void* ctx) {
SoapyModule* _this = (SoapyModule*)ctx;
spdlog::info("SoapyModule '{0}': Menu Select!", _this->name);
flog::info("SoapyModule '{0}': Menu Select!", _this->name);
if (_this->devList.size() == 0) {
return;
}
@ -296,14 +296,14 @@ private:
static void menuDeselected(void* ctx) {
SoapyModule* _this = (SoapyModule*)ctx;
spdlog::info("SoapyModule '{0}': Menu Deselect!", _this->name);
flog::info("SoapyModule '{0}': Menu Deselect!", _this->name);
}
static void start(void* ctx) {
SoapyModule* _this = (SoapyModule*)ctx;
if (_this->running) { return; }
if (_this->devId < 0) {
spdlog::error("No device available");
flog::error("No device available");
return;
}
@ -336,7 +336,7 @@ private:
_this->dev->activateStream(_this->devStream);
_this->running = true;
_this->workerThread = std::thread(_worker, _this);
spdlog::info("SoapyModule '{0}': Start!", _this->name);
flog::info("SoapyModule '{0}': Start!", _this->name);
}
static void stop(void* ctx) {
@ -350,7 +350,7 @@ private:
_this->stream.clearWriteStop();
SoapySDR::Device::unmake(_this->dev);
spdlog::info("SoapyModule '{0}': Stop!", _this->name);
flog::info("SoapyModule '{0}': Stop!", _this->name);
}
static void tune(double freq, void* ctx) {
@ -359,7 +359,7 @@ private:
if (_this->running) {
_this->dev->setFrequency(SOAPY_SDR_RX, _this->channelId, freq);
}
spdlog::info("SoapyModule '{0}': Tune: {1}!", _this->name, freq);
flog::info("SoapyModule '{0}': Tune: {1}!", _this->name, freq);
}
static void menuHandler(void* ctx) {