Closed pi0neerpat closed 2 years ago
Hey @pi0neerpat thanks for reporting
It's probably cause by some config that require pino-pretty inside api/src/lib/logger.ts
Do you have any custom config inside createLogger({})
?
I don't remember ever changing from default
import { createLogger } from '@redwoodjs/api/logger'
/**
* Creates a logger with RedwoodLoggerOptions
*
* These extend and override default LoggerOptions,
* can define a destination like a file or other supported pino log transport stream,
* and sets whether or not to show the logger configuration settings (defaults to false)
*
* @param RedwoodLoggerOptions
*
* RedwoodLoggerOptions have
* @param {options} LoggerOptions - defines how to log, such as pretty printing, redaction, and format
* @param {string | DestinationStream} destination - defines where to log, such as a transport stream or file
* @param {boolean} showConfig - whether to display logger configuration on initialization
*/
export const logger = createLogger({
options: { level: 'info', prettyPrint: true },
})
I removed prettyPrint: true
here and it fixed it. Relevant: https://github.com/pinojs/pino/blob/master/docs/api.md#options
pino-pretty was removed in https://github.com/redwoodjs/redwood/releases/tag/v0.47.0 , but is still required
Solved by installing
pino-pretty
in api