forked from syntaxbullet/AuroraBot-discord
feat: expansion of web dashboard with live activity feed and metrics
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { WebServer } from "@/web/server";
|
||||
|
||||
/**
|
||||
* Centralized logging utility with consistent formatting
|
||||
*/
|
||||
@@ -7,6 +9,7 @@ export const logger = {
|
||||
*/
|
||||
info: (message: string, ...args: any[]) => {
|
||||
console.log(`ℹ️ ${message}`, ...args);
|
||||
try { WebServer.broadcastLog("info", message); } catch { }
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -14,6 +17,7 @@ export const logger = {
|
||||
*/
|
||||
success: (message: string, ...args: any[]) => {
|
||||
console.log(`✅ ${message}`, ...args);
|
||||
try { WebServer.broadcastLog("success", message); } catch { }
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -21,6 +25,7 @@ export const logger = {
|
||||
*/
|
||||
warn: (message: string, ...args: any[]) => {
|
||||
console.warn(`⚠️ ${message}`, ...args);
|
||||
try { WebServer.broadcastLog("warning", message); } catch { }
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -28,6 +33,7 @@ export const logger = {
|
||||
*/
|
||||
error: (message: string, ...args: any[]) => {
|
||||
console.error(`❌ ${message}`, ...args);
|
||||
try { WebServer.broadcastLog("error", message); } catch { }
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -35,5 +41,6 @@ export const logger = {
|
||||
*/
|
||||
debug: (message: string, ...args: any[]) => {
|
||||
console.log(`🔍 ${message}`, ...args);
|
||||
try { WebServer.broadcastLog("debug", message); } catch { }
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user