first pass at adding logging framework

This commit is contained in:
Jeremy Borgman
2021-01-05 11:47:16 -06:00
committed by borgmanJeremy
parent ccbc1bfc17
commit 76ad9e5a6f
154 changed files with 43525 additions and 2 deletions

View File

@@ -31,6 +31,9 @@
#include <QTimer>
#include <QTranslator>
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG
#include "spdlog/spdlog.h"
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
#include "src/core/flameshotdbusadapter.h"
#include "src/utils/dbusutils.h"
@@ -50,6 +53,10 @@ int waitAfterConnecting(int delay, QCoreApplication& app)
int main(int argc, char* argv[])
{
spdlog::set_level(spdlog::level::debug); // Set global log level to debug
spdlog::set_pattern("[source %s] [function %!] [line %#] %v");
// required for the button serialization
// TODO: change to QVector in v1.0
qRegisterMetaTypeStreamOperators<QList<int>>("QList<int>");