Using a custom logger with colors and timestamp instead of console.xxx
This commit is contained in:
parent
4794477be3
commit
e800bc161d
34 changed files with 278 additions and 236 deletions
|
|
@ -18,7 +18,7 @@ Singleton {
|
|||
property bool isLoading: false
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("[Network] Service started")
|
||||
Logger.log("Network", "Service started")
|
||||
// Only refresh networks if WiFi is enabled
|
||||
if (Settings.data.network.wifiEnabled) {
|
||||
refreshNetworks()
|
||||
|
|
@ -165,7 +165,7 @@ Singleton {
|
|||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim() !== "") {
|
||||
console.warn("Error enabling WiFi:", text)
|
||||
Logger.warn("Network", "Error enabling WiFi:", text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -235,7 +235,7 @@ Singleton {
|
|||
stderr: StdioCollector {
|
||||
onStreamFinished: {
|
||||
if (text.trim() !== "") {
|
||||
console.warn("Error disabling WiFi:", text)
|
||||
Logger.warn("Network", "Error disabling WiFi:", text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -274,7 +274,7 @@ Singleton {
|
|||
|
||||
const parts = line.split(":")
|
||||
if (parts.length < 2) {
|
||||
console.warn("Malformed nmcli output line:", line)
|
||||
Logger.warn("Network", "Malformed nmcli output line:", line)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ Singleton {
|
|||
|
||||
const parts = line.split(":")
|
||||
if (parts.length < 4) {
|
||||
console.warn("Malformed nmcli output line:", line)
|
||||
Logger.warn("Network", "Malformed nmcli output line:", line)
|
||||
continue
|
||||
}
|
||||
const ssid = parts[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue