import pino from 'pino';
import { env } from '../../config/env.js';

export const logger = pino({
  name: 'core-edu',
  level: env.LOG_LEVEL,
  base: { service: 'core-edu' },
  ...(env.NODE_ENV === 'development'
    ? {
        transport: {
          target: 'pino-pretty',
          options: { colorize: true, translateTime: 'SYS:standard' },
        },
      }
    : {}),
});
