Next.js logs: where console.log goes on the server and in the browser

Updated 28 October 2026 · 4 min read

"My console.log does not show up" is the most common Next.js debugging question. The answer depends on where the code runs.

Where each log goes

CodeDevelopmentProduction
Server ComponentsTerminal; also replayed in the browser console with a Server label (Next.js 15+)Your host's server logs
Route Handlers, Server Actions, middlewareTerminalYour host's server or function logs
Client Components (after hydration)Browser consoleThe user's browser console
Client Components (first render)Terminal and browser consoleServer logs and browser console

The last row surprises people: a console.log in the body of a Client Component runs during server rendering too, so it appears in the terminal as well.

Logging server fetches

Set logging: { fetches: { fullUrl: true } } in next.config to print every server fetch with its status, cache result and timing. It does not cover axios or other clients.

Logs in production

Server logs go to standard output, so read them wherever your host collects it: the Vercel dashboard's logs, docker logs, or your platform's log viewer. Server errors shown to users carry a digest; search the logs for it to find the real error. Prefer structured logs (one JSON object per line) once you have more than one server.

Seeing server and browser logs together

With two windows, it is hard to know which server line belongs to which click. qaisdebugs shows server and browser console.* output and uncaught errors in one list, each line with its file, line number and the request it belongs to. Tokens and passwords in logged objects are masked automatically.

npm install -g qaisdebugs
qaisdebugs dev