---
title: "Logging in Next.js"
description: "Where are my logs? Next.js is a hybrid framework, so depending on where you call console.log(), the results could be in different spots."
source: "https://www.netlify.com/blog/2020/12/13/logging-in-next.js/"
last_updated: "2026-09-21T01:55:15.000Z"
---
Next.js is a hybrid framework. Some parts of it live in the browser, and some parts live in Node.js. When you’re developing, that can make for some fairly confusing development, sometimes!

Depending on where you put your `console.log()` statements, your logs will appear in different spots. Here’s some rules of thumb for figuring out where they are:

## If your logs are declared in a function that renders/uses React, they will appear in the browser.

Whether it is one of your React hooks, your React components, or a page-level component, that log will be in your browser console. This part of your code is the front-end of your application, so you can remember that the front-end is client-side, in the browser! This is true for both development and production mode.

## If your logs are in a data fetching function, they will appear in your terminal or build/function logs.

If you have utilities, call APIs, or render certain routes based on external data, these logs will be in your terminal in development mode. Your terminal is where the “backend” of your application lives, and where you can see pages being built. It’s a Node.js environment! In production mode, these logs will appear at build time in your build logs at build time, or in your function/API logs at runtime.

## I want to experiment with finding my Next.js logs!

Who doesn’t? Here’s a starter Next.js application to try this out:

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/next-netlify-starter&utm_source=blog&utm_medium=nextstarterlogging-cs&utm_campaign=devex)

(Clicking this button will deploy a Next.js starter project to Netlify, and clone it to your chosen Git provider. Log away!)

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Logging in Next.js&url=https://www.netlify.com/blog/2020/12/13/logging-in-next.js//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2020%2F12%2F13%2Flogging-in-next.js%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2020/12/13/logging-in-next.js//)
-   [Bluesky](https://bsky.app/intent/compose?text=Logging in Next.js+https://www.netlify.com/blog/2020/12/13/logging-in-next.js//)

* * *

### Tags

-   [Next.js](/blog/tags/next.js/)
-   [NodeJS](/blog/tags/nodejs/)

## Keep reading

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials December 4, 2020

[

### “Escaping” Next.js to access the browser

](/blog/2020/12/04/escaping-next.js-to-access-the-browser/)

-   ![Profile picture of Cassidy Williams](/_astro/a62099fab0f946e063c4b84ff4b4d9c94f9aa7a5-400x400_ZdakPa.webp)
    
    Cassidy Williams
    

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials December 9, 2020

[

### Global Styles in Next.js

](/blog/2020/12/09/global-styles-in-next.js/)

-   ![Profile picture of Cassidy Williams](/_astro/a62099fab0f946e063c4b84ff4b4d9c94f9aa7a5-400x400_ZdakPa.webp)
    
    Cassidy Williams
    

## Recent posts

Tools & Services September 10, 2026

[

### Cursor Origin repositories build, preview, and deploy on Netlify

](/blog/cursor-origin-repositories-on-netlify)

-   ![Profile picture of Gehrig Kunz](/_astro/b4e9f58d914d1334ea70d53ea55a1f26b26f1445-512x512_17SwOI.webp)
    
    Gehrig Kunz
    

Opinions & Insights September 2, 2026

[

### Build with Netlify came to Atlanta

](/blog/build-with-netlify-came-to-atlanta)

-   ![Profile picture of Tania Chakraborty](/_astro/707202a137a002306d64cd12d886e28258c1bd8d-800x800_ZfolOr.webp)
    
    Tania Chakraborty
    

News & Announcements August 25, 2026

[

### Compete in OpenAI’s WebMCP Challenge with Netlify

](/blog/compete-openai-webmcp-challenge)

-   ![Profile picture of Karthik Puvvada](/_astro/e5524d3c315ad5114e1d5300d8991bfe902916fe-192x192_Z1w18MB.webp)
    
    Karthik Puvvada
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)