pinojs / pino

🌲 super fast, all natural json logger
http://getpino.io
MIT License
14.21k stars 875 forks source link

Issue with transport on Windows using Deno 2 and TypeScript - no output is written to the log file. #2060

Closed cvermeer579 closed 2 weeks ago

cvermeer579 commented 2 weeks ago

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:

import { pino } from 'pino';
export const logger = pino();

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?

jsumners commented 2 weeks ago

Thank you for the report. This project targets the Node.js runtime. Please file issues with the runtime if you are not using Node.js.