Files
kantinen-wrapper/src/utils/logger.ts
Michael Kaufmann bc98a19fc6 feat: server-based version with menu flagging, distributed polling, and SSE
Complete implementation including:
- Express server with Bessa API proxy
- Puppeteer scraper for menu data
- Flag storage (file-based persistence)
- SSE manager for real-time updates
- Polling orchestrator for distributed polling
- Frontend with weekly view, ordering, and flagging UI
- Yellow/green glow indicators for flagged items
2026-02-12 08:36:05 +01:00

26 lines
658 B
TypeScript

// Simple logger utility
export const logger = {
info: (message: string, ...args: any[]) => {
console.log(`[INFO] ${message}`, ...args);
},
success: (message: string, ...args: any[]) => {
console.log(`${message}`, ...args);
},
error: (message: string, ...args: any[]) => {
console.error(`❌ [ERROR] ${message}`, ...args);
},
debug: (message: string, ...args: any[]) => {
if (process.env.DEBUG) {
console.log(`[DEBUG] ${message}`, ...args);
}
},
warn: (message: string, ...args: any[]) => {
console.warn(`⚠️ [WARN] ${message}`, ...args);
},
};