How to pipe pino-pretty with tsx?

155 Views Asked by At

I installed pino-pretty and tsx in my project and created a command:

"start": "tsx watch -r dotenv/config ./src/index.ts | pino-pretty",

Unfortunately I don't get any formatting with this command. Any idea how to make this work instead? I am using Windows but I think that should still work the same. In my code I log using pino:

import { pino } from "pino"

const logger = pino({ name: "test" })
logger.info("hello")
0

There are 0 best solutions below