/** * Structured Logger for Rebase Backend * * Outputs JSON lines when `NODE_ENV=production`, human-readable prefixed * lines otherwise. Designed to work with Google Cloud Logging severity levels. * * Usage: * import { logger } from "./utils/logger"; * logger.info("Server started", { port: 3001 }); * logger.error("Request failed", { path: "/api/test", error: err }); */ export type LogLevel = "debug" | "info" | "warn" | "error"; export interface LogEntry { severity: string; message: string; timestamp: string; [key: string]: unknown; } export interface Logger { debug(message: string, data?: Record): void; info(message: string, data?: Record): void; warn(message: string, data?: Record): void; error(message: string, data?: Record): void; child(defaultFields: Record): Logger; } /** * Singleton logger instance. * In production: emits JSON lines with `severity`, `message`, `timestamp`. * In development: emits human-readable prefixed lines. */ export declare const logger: Logger;