diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 05:47:11 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 05:47:11 -0500 |
| commit | 255f96ce7e27124f1bed071564e67a2e4a25c8aa (patch) | |
| tree | 48a369096b568326269713663a270b9838a73795 /src | |
| parent | e845126e09357f8713ca0c9f593970c7c634328e (diff) | |
only log crash dumps message on startup
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 14 | ||||
| -rw-r--r-- | src/organizercore.cpp | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 02347ee3..41ce0eb5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -554,6 +554,20 @@ int runApplication(MOApplication &application, SingleInstance &instance, return 1; } + { + // log if there are any dmp files + const auto hasCrashDumps = + !QDir(QString::fromStdWString(organizer.crashDumpsPath())) + .entryList({"*.dmp"}, QDir::Files) + .empty(); + + if (hasCrashDumps) { + log::debug( + "there are crash dumps in '{}'", + QString::fromStdWString(organizer.crashDumpsPath())); + } + } + log::debug("initializing plugins"); PluginContainer pluginContainer(&organizer); pluginContainer.loadPlugins(); diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 9ceb149e..c585ba09 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -484,12 +484,6 @@ bool OrganizerCore::cycleDiagnostics() removeOldFiles(path, "*.dmp", maxDumps, QDir::Time|QDir::Reversed); } - // log if there are any files left - const auto files = QDir(path).entryList({"*.dmp"}, QDir::Files); - if (!files.isEmpty()) { - log::debug("there are crash dumps in '{}'", path); - } - return true; } |
