From 76df854483c40cb7610d79c5540a5e67f554d840 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sat, 5 Oct 2019 08:53:31 -0400 Subject: only log a warning for symlinks instead of exiting MO added logs: when dmp files are present, for portable instances, and the ini path clear the log widget when switching instances --- src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index fe5fd87a..a6918d99 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -515,6 +515,10 @@ int runApplication(MOApplication &application, SingleInstance &instance, const QString dataPath = application.property("dataPath").toString(); log::info("data path: {}", dataPath); + if (InstanceManager::isPortablePath(dataPath)) { + log::debug("this is a portable instance"); + } + if (!bootstrap()) { reportError("failed to set up data paths"); return 1; @@ -531,6 +535,8 @@ int runApplication(MOApplication &application, SingleInstance &instance, Settings settings(dataPath + "/" + QString::fromStdWString(AppConfig::iniFileName())); log::getDefault().setLevel(settings.diagnostics().logLevel()); + log::debug("using ini at '{}'", settings.filename()); + // global crashDumpType sits in OrganizerCore to make a bit less ugly to // update it when the settings are changed during runtime OrganizerCore::setGlobalCrashDumpsType(settings.diagnostics().crashDumpsType()); @@ -860,6 +866,8 @@ int main(int argc, char *argv[]) } // we continue for the primary instance OR if MO was called with parameters do { + LogModel::instance().clear(); + // make sure the log file isn't locked in case MO was restarted and // the previous instance gets deleted log::getDefault().setFile({}); -- cgit v1.3.1