import { pino } from 'pino';
import { build } from 'pino-pretty';
const prettyOptions = {
    colorize: true,
    ignore: 'pid,hostname',
    translateTime: 'SYS:HH:MM:ss'
};
export const defaultLoggerOptions = {
    transport: {
        options: prettyOptions,
        target: 'pino-pretty'
    }
};
export const prettySyncLoggerDestination = build({
    ...prettyOptions,
    destination: 1,
    sync: true
});
export const getLogger = (name = 'payload', options, destination)=>{
    if (options) {
        return pino({
            name: options?.name || name,
            enabled: process.env.DISABLE_LOGGING !== 'true',
            ...options || defaultLoggerOptions
        }, destination);
    }
    return pino(prettySyncLoggerDestination);
};

//# sourceMappingURL=logger.js.map