Skip to content

Commit a41152e

Browse files
authored
Use NEXT_PRIVATE_DEBUG_CACHE env variable for cache handler debug logs (#77585)
Instead of `NEXT_PRIVATE_DEBUG_USE_CACHE`, we're now using the env variable `NEXT_PRIVATE_DEBUG_CACHE`, which is already used in other places for cache debugging. In addition, `process.pid` is not logged anymore. This prevents Node.js API usage errors in #77577 when bundling with Turbopack.
1 parent 710c76b commit a41152e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/next/src/server/use-cache/handlers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import DefaultCacheHandler from '../lib/cache-handlers/default'
22
import type { CacheHandlerCompat } from '../lib/cache-handlers/types'
33

4-
const debug = process.env.NEXT_PRIVATE_DEBUG_USE_CACHE
4+
const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE
55
? (message: string, ...args: any[]) => {
6-
console.log(`use-cache[${process.pid}]: ${message}`, ...args)
6+
console.log(`use-cache: ${message}`, ...args)
77
}
88
: () => {}
99

0 commit comments

Comments
 (0)