1
0
mirror of synced 2025-02-06 14:14:22 +01:00

impr: Better exit task logging

This commit is contained in:
WerWolv 2023-11-10 23:25:02 +01:00
parent 2073793fcd
commit aa93bcb142

View File

@ -597,7 +597,7 @@ namespace hex::init {
void runExitTasks() { void runExitTasks() {
for (const auto &[name, task, async] : init::getExitTasks()) { for (const auto &[name, task, async] : init::getExitTasks()) {
bool result = task(); bool result = task();
log::info("Finished exit task {} {}", name, result ? "successfully" : "unsuccessfully"); log::info("Exit task '{0}' finished {1}", result ? "successfully" : "unsuccessfully");
} }
} }
@ -618,10 +618,10 @@ namespace hex::init {
std::vector<Task> getExitTasks() { std::vector<Task> getExitTasks() {
return { return {
{ "Saving settings...", storeSettings, false }, { "Saving settings", storeSettings, false },
{ "Cleaning up shared data...", deleteSharedData, false }, { "Cleaning up shared data", deleteSharedData, false },
{ "Unloading plugins...", unloadPlugins, false }, { "Unloading plugins", unloadPlugins, false },
{ "Clearing old logs...", clearOldLogs, false }, { "Clearing old logs", clearOldLogs, false },
}; };
} }