Open RjManhas opened 1 year ago
function getLoggerByEnv() {
let result = undefined
switch (process.env.LOGGER) {
case "pino-pretty":
result = transport:{
target: 'pino-pretty',
}
break
}
return result
}
logger: getLoggerByEnv()
Hello im using the fastify logger and with pino-pretty
this is what my current app looks like logger: { transport:{ target: 'pino-pretty', } }
and i want to be able to disable pino pretty based of if env is set to production or development and how to setup it logging to a file and rotating it.