mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-05 04:32:30 +02:00
20 lines
543 B
QML
20 lines
543 B
QML
pragma Singleton
|
|
import QtQuick
|
|
|
|
// Noctalia compat shim. Plugins call Logger.d/i/w/e routinely.
|
|
QtObject {
|
|
function format(args) {
|
|
var out = []
|
|
for (var i = 0; i < args.length; i++) {
|
|
var a = args[i]
|
|
out.push(a === undefined ? "undefined" : (a === null ? "null" : String(a)))
|
|
}
|
|
return out.join(" ")
|
|
}
|
|
|
|
function d() { console.debug(format(arguments)) }
|
|
function i() { console.info(format(arguments)) }
|
|
function w() { console.warn(format(arguments)) }
|
|
function e() { console.error(format(arguments)) }
|
|
}
|