How to show all characters on nest-winston log?

38 Views Asked by At

I'm working on NestJS. Here is my winston version,

"nest-winston": "^1.9.3",
"winston": "^3.10.0",
"winston-daily-rotate-file": "^4.7.1"

The problem is the log is not showing all character. How could I set this to show all character ? At the end of the log is showing this message - '... 1014 more characters'

Like this,

{
  context: undefined,
  level: 'info',
  message: 'this is my example long lo ... 1014 more characters',
  timestamp: '10/6/2023, 11:09:31 AM'
}

Below is my winston setting,

  const app = await NestFactory.create(AppModule, {
    logger: WinstonModule.createLogger({
      transports: [
        new transports.DailyRotateFile({
          filename: `logs/%DATE%-error.log`, 
          level: 'error',
          format: format.combine(format.timestamp({format:timezoned}), format.prettyPrint()),
          datePattern: 'YYYY-MM-DD',
          zippedArchive: true, 
          maxFiles: '360d',
        }),
        new transports.DailyRotateFile({
          filename: `logs/%DATE%-info.log`,
          level: 'info',
          format: format.combine(format.timestamp({format:timezoned}), format.prettyPrint()),
          datePattern: 'YYYY-MM-DD',
          zippedArchive: true,
          maxFiles: '360d',
        }),
        new transports.Console({
          format: format.combine(
            format.cli(),
            format.splat(),
            format.timestamp(),
            format.printf((info) => {
              return `${info.timestamp} ${info.level}: ${info.message}`;
            }),
          ),
        }),
      ],
    }),
  });
0

There are 0 best solutions below