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
This commit is contained in:
25
src/utils/logger.ts
Normal file
25
src/utils/logger.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user