- 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
28 lines
631 B
TypeScript
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);
|
|
},
|
|
};
|
|
|
|
|