Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
f819c171
Commit
f819c171
authored
Aug 22, 2025
by
RobPruzan
Committed by
Jiachi Liu
Sep 10, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better user message in log-patch
parent
a49c479a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
console-patch.ts
packages/next/src/next-devtools/shared/console-patch.ts
+6
-10
forward-logs.test.ts
...next/src/next-devtools/userspace/app/forward-logs.test.ts
+1
-1
forward-logs.ts
...ages/next/src/next-devtools/userspace/app/forward-logs.ts
+1
-1
receive-logs.ts
packages/next/src/server/dev/browser-logs/receive-logs.ts
+1
-1
No files found.
packages/next/src/next-devtools/shared/
log
-patch.ts
→
packages/next/src/next-devtools/shared/
console
-patch.ts
View file @
f819c171
...
@@ -93,17 +93,13 @@ export function patchConsoleMethod<T extends keyof Console>(
...
@@ -93,17 +93,13 @@ export function patchConsoleMethod<T extends keyof Console>(
wrapper
(
methodName
,
...
args
)
wrapper
(
methodName
,
...
args
)
/*
/*
* This script is from Next.js.
* This script is from Next.js console patching.
* You're likely here because you thought this script sent an error or warning
* to the console. Next.js patches the console to send logs to your terminal
* output, so this file appears as a source. However, the console call actually
* came from another script.
*
*
*
To remove this script from stack traces, open your browser's DevTools before
*
You're seeing this because Next.js patches console methods to send logs
* t
hese console calls happen.
* t
o your terminal.
*
*
*
Or, to prevent Next.js from patching the console, go to your next.config file
*
To see the original location, set browserDebugInfoInTerminal to false
*
and set browserDebugInfoInTerminal to fals
e.
*
in your next.config fil
e.
*/
*/
originalMethod
.
apply
(
this
,
args
)
originalMethod
.
apply
(
this
,
args
)
}
}
...
...
packages/next/src/next-devtools/userspace/app/forward-logs.test.ts
View file @
f819c171
import
{
UNDEFINED_MARKER
}
from
'../../shared/
log
-patch'
import
{
UNDEFINED_MARKER
}
from
'../../shared/
console
-patch'
import
{
import
{
preLogSerializationClone
,
preLogSerializationClone
,
PROMISE_MARKER
,
PROMISE_MARKER
,
...
...
packages/next/src/next-devtools/userspace/app/forward-logs.ts
View file @
f819c171
...
@@ -16,7 +16,7 @@ import {
...
@@ -16,7 +16,7 @@ import {
type
LogMethod
,
type
LogMethod
,
patchConsoleMethod
,
patchConsoleMethod
,
UNDEFINED_MARKER
,
UNDEFINED_MARKER
,
}
from
'../../shared/
log
-patch'
}
from
'../../shared/
console
-patch'
const
terminalLoggingConfig
=
getTerminalLoggingConfig
()
const
terminalLoggingConfig
=
getTerminalLoggingConfig
()
export
const
PROMISE_MARKER
=
'Promise {}'
export
const
PROMISE_MARKER
=
'Promise {}'
...
...
packages/next/src/server/dev/browser-logs/receive-logs.ts
View file @
f819c171
...
@@ -12,7 +12,7 @@ import {
...
@@ -12,7 +12,7 @@ import {
type
LogMethod
,
type
LogMethod
,
type
ConsoleEntry
,
type
ConsoleEntry
,
UNDEFINED_MARKER
,
UNDEFINED_MARKER
,
}
from
'../../../next-devtools/shared/
log
-patch'
}
from
'../../../next-devtools/shared/
console
-patch'
import
type
{
NextConfigComplete
}
from
'../../config-shared'
import
type
{
NextConfigComplete
}
from
'../../config-shared'
export
function
getDisplayedSourceLocation
(
export
function
getDisplayedSourceLocation
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment