Unverified Commit 4955da9e authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update stalled ensure log to use debug instead (#39826)

This updates the stalled ensure log to use debug instead the log isn't really actionable by the user and is more so meant for debugging purposes.
x-ref: slack thread
parent b431bd4b
import type ws from 'ws'
import * as Log from '../../build/output/log'
import origDebug from 'next/dist/compiled/debug'
import type { webpack } from 'next/dist/compiled/webpack/webpack'
import type { NextConfigComplete } from '../config-shared'
import { EventEmitter } from 'events'
......@@ -23,6 +23,8 @@ import {
COMPILER_NAMES,
} from '../../shared/lib/constants'
const debug = origDebug('next:on-demand-entry-handler')
/**
* Returns object keys with type inferred from the object key
*/
......@@ -517,7 +519,7 @@ export function onDemandEntryHandler({
async ensurePage(page: string, clientOnly: boolean): Promise<void> {
const stalledTime = 60
const stalledEnsureTimeout = setTimeout(() => {
Log.warn(
debug(
`Ensuring ${page} has taken longer than ${stalledTime}s, if this continues to stall this may be a bug`
)
}, stalledTime * 1000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment