Add basic debug logger.

This commit is contained in:
2026-02-01 20:20:39 -05:00
parent be383869b2
commit 693ffbcc00
9 changed files with 121 additions and 22 deletions

26
qml/Logger/Logger.qml Normal file
View File

@@ -0,0 +1,26 @@
pragma Singleton
import QtQuick
QtObject {
signal logged(string level, string message)
function log(msg) {
console.log(msg)
logged("INFO", msg)
}
function debug(msg) {
console.log(msg)
logged("DEBUG", msg)
}
function warn(msg) {
console.warn(msg)
logged("WARN", msg)
}
function error(msg) {
console.error(msg)
logged("ERROR", msg)
}
}

1
qml/Logger/qmldir Normal file
View File

@@ -0,0 +1 @@
singleton Logger 1.0 Logger.qml