Skip to content

Commit

Permalink
Update stalled ensure log to use debug instead (#39826)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ijjk committed Aug 22, 2022
1 parent b431bd4 commit 4955da9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/next/server/dev/on-demand-entry-handler.ts
@@ -1,5 +1,5 @@
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'
Expand All @@ -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
*/
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4955da9

Please sign in to comment.