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:
@@ -5,9 +5,11 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("SettingsSearchService")
|
||||
|
||||
property string query: ""
|
||||
property var results: []
|
||||
@@ -41,12 +43,12 @@ Singleton {
|
||||
root.indexLoaded = true;
|
||||
root._rebuildTranslationCache();
|
||||
} catch (e) {
|
||||
console.warn("SettingsSearchService: Failed to parse index:", e);
|
||||
log.warn("Failed to parse index:", e);
|
||||
root.settingsIndex = [];
|
||||
root._translatedCache = [];
|
||||
}
|
||||
}
|
||||
onLoadFailed: error => console.warn("SettingsSearchService: Failed to load index:", error)
|
||||
onLoadFailed: error => log.warn("Failed to load index:", error)
|
||||
}
|
||||
|
||||
function registerCard(settingKey, item, flickable) {
|
||||
|
||||
Reference in New Issue
Block a user