Files
microdao-daarion/backend/infra/logger/logger.ts
Apple 3de3c8cb36 feat: Add presence heartbeat for Matrix online status
- matrix-gateway: POST /internal/matrix/presence/online endpoint
- usePresenceHeartbeat hook with activity tracking
- Auto away after 5 min inactivity
- Offline on page close/visibility change
- Integrated in MatrixChatRoom component
2025-11-27 00:19:40 -08:00

28 lines
631 B
TypeScript

/**
* Logger
* MVP: Simple console logger
* Future: Replace with proper logging library (Winston, Pino, etc.)
*/
type LogLevel = 'info' | 'warn' | 'error' | 'debug';
export const logger = {
info: (message: string, ...args: unknown[]) => {
console.log(`[INFO] ${message}`, ...args);
},
warn: (message: string, ...args: unknown[]) => {
console.warn(`[WARN] ${message}`, ...args);
},
error: (message: string, ...args: unknown[]) => {
console.error(`[ERROR] ${message}`, ...args);
},
debug: (message: string, ...args: unknown[]) => {
console.debug(`[DEBUG] ${message}`, ...args);
},
};