However, when I introduce the transport to log to a file, no output appears, and the log file is not created:
import { pino } from 'pino';
const transport = pino.transport({
level: 'trace',
target: 'pino/file',
options: { destination: '.\\log.txt' }, // Using Windows path
});
export const logger = pino(transport);
No errors are thrown, but the expected log file doesn't appear, and no logging is written.
I am running Deno with the --allow-write flag, and Deno’s internal logger is correctly logging output. Is there any known issue with using Pino's transport functionality on Deno 2, or is there something specific I might be missing in my configuration?
I’m using Deno 2 with TypeScript on Windows, and I've encountered an issue when trying to log with Pino using a transport.
The following code works perfectly and logs to the debug console as expected:
However, when I introduce the transport to log to a file, no output appears, and the log file is not created:
No errors are thrown, but the expected log file doesn't appear, and no logging is written.
I am running Deno with the --allow-write flag, and Deno’s internal logger is correctly logging output. Is there any known issue with using Pino's transport functionality on Deno 2, or is there something specific I might be missing in my configuration?