mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-30 09:32:05 -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:
@@ -6,6 +6,7 @@ import Quickshell
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
readonly property var log: Log.scoped("MultimediaService")
|
||||
|
||||
property bool available: false
|
||||
|
||||
@@ -14,6 +15,7 @@ Singleton {
|
||||
const testObj = Qt.createQmlObject(`
|
||||
import QtQuick
|
||||
import QtMultimedia
|
||||
import qs.Services
|
||||
Item {}
|
||||
`, root, "MultimediaService.TestComponent");
|
||||
if (testObj) {
|
||||
@@ -29,7 +31,7 @@ Singleton {
|
||||
|
||||
Component.onCompleted: {
|
||||
if (!detectAvailability()) {
|
||||
console.warn("MultimediaService: QtMultimedia not available");
|
||||
log.warn("QtMultimedia not available");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user