Closed rubiin closed 2 years ago
can you make an example?
I am on nestjs using nestjs-pino
Heres how I am logging on std as well as file using transports:
{
pinoHttp: {
level: "info",
redact: {
paths: ["req.headers.authorization"],
remove: true,
},
transport: {
targets: [
{
target: "pino/file",
level: "info",
options: {
destination: "logs/info.log",
mkdir: true,
},
},
{
target: "pino-pretty",
level: "info",
options: {
colorize: true,
prettyPrint: false,
translateTime: true,
ignore: "pid,hostname",
},
},
],
},
},
};
I think pino-pretty does not have a option to turn off prettyPrint at the moment
It doesn't and it won't. If you do not want to pretty print logs, do not send them to the pretty print module.
Using pretty print along with file in transport. However i cannot seem to turn of pretty printing. Is there anything I am missing