mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
server logger
move over to qt signals that are processed in simulators
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "simulators.hpp"
|
||||
#define INTERNAL
|
||||
#include "simulator_base.hpp"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "websocket.hpp"
|
||||
#include <QCoreApplication>
|
||||
#include <QDirIterator>
|
||||
@@ -153,6 +154,11 @@ void Simulators::switch_simulator(std::string name)
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
connect(m_simulators.at(m_current_simulator).get(), &Simulator_base::log_signal, this,
|
||||
[](const char *filename_in, int line_in, const char *funcname_in, int level, QString msg) {
|
||||
spdlog::default_logger_raw()->log(spdlog::source_loc{filename_in, line_in, funcname_in},
|
||||
(spdlog::level::level_enum)level, msg.toStdString());
|
||||
});
|
||||
this->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user