core/log: capture early logs in fs logger

This commit is contained in:
outfoxxed 2024-08-07 15:53:11 -07:00
parent 7c7326ec52
commit 8364e94d26
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
8 changed files with 160 additions and 105 deletions

View file

@ -22,14 +22,12 @@
#include <qtextstream.h>
#include <qtpreprocessorsupport.h>
#include "filelogger.hpp"
#include "logging.hpp"
#include "paths.hpp"
#include "plugin.hpp"
#include "rootwrapper.hpp"
int qs_main(int argc, char** argv) {
LogManager::instance();
QString configFilePath;
QString workingDirectory;
@ -48,6 +46,9 @@ int qs_main(int argc, char** argv) {
QCoreApplication::setApplicationName("quickshell");
QCoreApplication::setApplicationVersion("0.1.0 (" GIT_REVISION ")");
// Start log manager - has to happen with an active event loop or offthread can't be started.
LogManager::init();
QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
@ -390,7 +391,7 @@ int qs_main(int argc, char** argv) {
app = new QGuiApplication(argc, argv);
}
FileLoggerThread::init();
LogManager::initFs();
if (debugPort != -1) {
QQmlDebuggingEnabler::enableDebugging(true);