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:
@@ -14,6 +14,7 @@ import qs.Widgets
|
||||
|
||||
Item {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("LockScreenContent")
|
||||
|
||||
function encodeFileUrl(path) {
|
||||
if (!path)
|
||||
@@ -95,9 +96,9 @@ Item {
|
||||
if (SessionService.loginctlAvailable && DMSService.apiVersion >= 2) {
|
||||
DMSService.sendRequest("loginctl.lockerReady", null, resp => {
|
||||
if (resp?.error)
|
||||
console.warn("lockerReady failed:", resp.error);
|
||||
log.warn("lockerReady failed:", resp.error);
|
||||
else
|
||||
console.log("lockerReady sent (afterAnimating/afterRendering)");
|
||||
log.debug("lockerReady sent (afterAnimating/afterRendering)");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -803,7 +804,7 @@ Item {
|
||||
}
|
||||
|
||||
if (pam.passwd.active) {
|
||||
console.log("PAM is active, ignoring input");
|
||||
log.debug("PAM is active, ignoring input");
|
||||
event.accepted = true;
|
||||
return;
|
||||
}
|
||||
@@ -1622,7 +1623,7 @@ Item {
|
||||
buttonSize: 40
|
||||
onClicked: {
|
||||
if (demoMode) {
|
||||
console.log("Demo: Power Menu");
|
||||
log.debug("Demo: Power Menu");
|
||||
} else {
|
||||
powerMenu.show();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user