1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

logger: add a dedicated QML logging Singleton

- adds log.info/error/debug/warn/fatal
- adds ability to write logs to any file
- add CLI options in addition to env to set log levels
This commit is contained in:
bbedward
2026-04-29 15:40:44 -04:00
parent 3b96c6ab22
commit f76724f7cd
84 changed files with 1764 additions and 1297 deletions

View File

@@ -9,6 +9,7 @@ import qs.Modules.Settings.DisplayConfig
Item {
id: root
readonly property var log: Log.scoped("DMSShellIPC")
required property var powerMenuModalLoader
required property var processListModalLoader
@@ -861,7 +862,7 @@ Item {
function set(key: string, value: string): string {
if (!(key in SettingsData)) {
console.warn("Cannot set property, not found:", key);
log.warn("Cannot set property, not found:", key);
return "SETTINGS_INVALID_KEY";
}
@@ -894,12 +895,12 @@ Item {
throw "Unsupported type";
}
console.warn("Setting:", key, value);
log.warn("Setting:", key, value);
SettingsData[key] = value;
SettingsData.saveSettings();
return "SETTINGS_SET_SUCCESS";
} catch (e) {
console.warn("Failed to set property:", key, "error:", e);
log.warn("Failed to set property:", key, "error:", e);
return "SETTINGS_SET_FAILURE";
}
}