diff --git a/src/utils/logging.ts b/src/utils/logging.ts index 66e350b0..4e7ada63 100644 --- a/src/utils/logging.ts +++ b/src/utils/logging.ts @@ -44,22 +44,18 @@ export function getDefaultPinoLogLevel(): Level { } export function getPinoTransport() { - const logFormat = (process.env.WAHA_LOG_FORMAT || '').toUpperCase(); - if (!logFormat) { - return; - } + const logFormat = (process.env.WAHA_LOG_FORMAT || 'PRETTY').toUpperCase(); if (logFormat == 'JSON') { return undefined; } - if (logFormat == 'PRETTY') { - return { - target: 'pino-pretty', - options: { - singleLine: true, - colorize: true, - }, - }; - } + return { + target: 'pino-pretty', + options: { + singleLine: true, + colorize: true, + messageFormat: '{if session} session:{session} - {end}{msg}', + }, + }; } export { getNestJSLogLevels };