Files
CodeListing/config/logger.ts
2025-05-23 22:23:31 +04:00

24 lines
457 B
TypeScript

import pino from 'pino';
import pretty from 'pino-pretty';
const consoleLogger = pino(
pretty({
colorize: true,
ignore: 'hostname,pid',
}),
);
const logger = {
info: (msg: string, ...args: any[]) => {
consoleLogger.info(msg, ...args);
},
error: (msg: string, ...args: any[]) => {
consoleLogger.error(msg, ...args);
},
warn: (msg: string, ...args: any[]) => {
consoleLogger.warn(msg, ...args);
},
};
export { logger };