env
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m52s
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m52s
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user