mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Use SPDLOG_* to use file:line
This commit is contained in:
+1
-3
@@ -3,7 +3,6 @@
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
#include "spdlog/async.h"
|
||||
#include "spdlog/sinks/rotating_file_sink.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
@@ -19,7 +18,7 @@ void init_logger()
|
||||
auto logger = std::make_shared<spdlog::async_logger>("sim_us", sinks.begin(), sinks.end(), spdlog::thread_pool(),
|
||||
spdlog::async_overflow_policy::block);
|
||||
spdlog::set_default_logger(logger);
|
||||
spdlog::set_pattern("[%H:%M:%S %z] [%^---%L---%$] %v");
|
||||
spdlog::set_pattern("[%H:%M:%S %z] [%^---%L---%$] %@: %v");
|
||||
spdlog::flush_every(std::chrono::seconds(3));
|
||||
spdlog::set_level(spdlog::level::trace);
|
||||
}
|
||||
@@ -45,7 +44,6 @@ int main(int argc, char *argv[])
|
||||
parser.process(a);
|
||||
uint16_t port = parser.value(port_option).toUShort();
|
||||
QString can_port = parser.value(can_port_option);
|
||||
spdlog::info(can_port.toStdString());
|
||||
|
||||
// Initialize the logger
|
||||
init_logger();
|
||||
|
||||
Reference in New Issue
Block a user