import pino from 'pino';
import { getWcagConfig } from '@wcag-ada/config';

const config = getWcagConfig();

export const logger = pino({
  level: config.log.level,
  transport: config.environment === 'development' ? {
    target: 'pino-pretty',
    options: {
      colorize: true,
      ignore: 'pid,hostname',
      translateTime: 'HH:MM:ss',
    },
  } : undefined,
});