[logger] Add prefixes to most Log messages (#3923)

Co-authored-by: veeck <gitkraken@veeck.de>
This commit is contained in:
Veeck
2025-10-21 20:32:48 +02:00
committed by GitHub
parent f1c0c38c86
commit a1c1e9560c
34 changed files with 220 additions and 238 deletions

View File

@@ -76,10 +76,10 @@ Module.register("weather", {
moment.locale(this.config.lang);
if (this.config.useKmh) {
Log.warn("Your are using the deprecated config values 'useKmh'. Please switch to windUnits!");
Log.warn("[weather] Deprecation warning: Your are using the deprecated config values 'useKmh'. Please switch to windUnits!");
this.windUnits = "kmh";
} else if (this.config.useBeaufort) {
Log.warn("Your are using the deprecated config values 'useBeaufort'. Please switch to windUnits!");
Log.warn("[weather] Deprecation warning: Your are using the deprecated config values 'useBeaufort'. Please switch to windUnits!");
this.windUnits = "beaufort";
}
if (typeof this.config.showHumidity === "boolean") {
@@ -109,7 +109,7 @@ Module.register("weather", {
for (let event of payload) {
if (event.location || event.geo) {
this.firstEvent = event;
Log.debug("First upcoming event with location: ", event);
Log.debug("[weather] First upcoming event with location: ", event);
break;
}
}
@@ -163,7 +163,7 @@ Module.register("weather", {
// What to do when the weather provider has new information available?
updateAvailable () {
Log.log("New weather information available.");
Log.log("[weather] New weather information available.");
// this value was changed from 0 to 300 to stabilize weather tests:
this.updateDom(300);
this.scheduleUpdate();
@@ -208,7 +208,7 @@ Module.register("weather", {
this.weatherProvider.fetchWeatherForecast();
break;
default:
Log.error(`Invalid type ${this.config.type} configured (must be one of 'current', 'hourly', 'daily' or 'forecast')`);
Log.error(`[weather] Invalid type ${this.config.type} configured (must be one of 'current', 'hourly', 'daily' or 'forecast')`);
}
}, nextLoad);
},