[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

@@ -4,15 +4,15 @@ const Class = require("./class");
const NodeHelper = Class.extend({
init () {
Log.log("Initializing new module helper ...");
Log.log("[nodehelper] Initializing new module helper ...");
},
loaded () {
Log.log(`Module helper loaded: ${this.name}`);
Log.log(`[nodehelper] Module helper loaded: ${this.name}`);
},
start () {
Log.log(`Starting module helper: ${this.name}`);
Log.log(`[nodehelper] Starting module helper: ${this.name}`);
},
/**
@@ -21,7 +21,7 @@ const NodeHelper = Class.extend({
* gracefully exit the module.
*/
stop () {
Log.log(`Stopping module helper: ${this.name}`);
Log.log(`[nodehelper] Stopping module helper: ${this.name}`);
},
/**
@@ -30,7 +30,7 @@ const NodeHelper = Class.extend({
* @param {object} payload The payload of the notification.
*/
socketNotificationReceived (notification, payload) {
Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`);
Log.log(`[nodehelper] ${this.name} received a socket notification: ${notification} - Payload: ${payload}`);
},
/**
@@ -83,7 +83,7 @@ const NodeHelper = Class.extend({
setSocketIO (io) {
this.io = io;
Log.log(`Connecting socket for: ${this.name}`);
Log.log(`[nodehelper] Connecting socket for: ${this.name}`);
io.of(this.name).on("connection", (socket) => {
// register catch all.