import { pino } from 'pino' const isProduction = process.env.NODE_ENV === 'production' /** * Single logger instance for the whole API. Import it wherever you need to log — * never use `console.log` in the backend. */ export const logger = pino({ level: process.env.LOG_LEVEL || (isProduction ? 'info' : 'debug'), ...(isProduction ? {} : { transport: { target: 'pino-pretty', options: { colorize: true, translateTime: 'HH:MM:ss', ignore: 'pid,hostname' }, }, }), }) export type Logger = typeof logger