env
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m52s

This commit is contained in:
2026-01-27 23:51:48 +01:00
parent 5a5c10ca36
commit cbca29cbcf
3 changed files with 15 additions and 7 deletions

View File

@@ -9,11 +9,16 @@ export class PinoLoggerService implements LoggerService {
if (parent) {
this.logger = parent.child({ name });
} else {
// In Next.js, especially in the Edge runtime or during instrumentation,
// pino transports (which use worker threads) can cause issues.
// We disable transport in production and during instrumentation.
const useTransport = !config.isProduction && typeof window === 'undefined';
this.logger = pino({
name: name || 'app',
level: config.logging.level,
transport:
!config.isProduction
useTransport
? {
target: 'pino-pretty',
options: {