Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stalled ensure log to use debug instead #39826

Merged
merged 1 commit into from Aug 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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