d516e93323
- Proactive Grok integration (xAI API + local CLI fallback) - Real road routing via OSRM (no more bird's-eye lines) - Heavy structured logging for fast iteration - Strong sanitization + geocoding + ErrorBoundary (no black screens) - Playwright E2E tests (API diagnostic + full UI flow) - scripts/dev.sh for one-command startup - Clean .env.example + documentation This is a stable checkpoint before further prompt/UI refinement.
12 lines
423 B
TypeScript
12 lines
423 B
TypeScript
import pino from 'pino';
|
|
|
|
export const logger = pino({
|
|
level: process.env.LOG_LEVEL || (process.env.NODE_ENV === 'production' ? 'info' : 'debug'),
|
|
transport: process.env.NODE_ENV !== 'production'
|
|
? { target: 'pino-pretty', options: { colorize: true } }
|
|
: undefined,
|
|
});
|
|
|
|
// Helper used across the server (consistent with other projects)
|
|
export const createLogger = (module: string) => logger.child({ module });
|