Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Important
Security Advisory: React2Shell & two new vulnerabilities
Find out more

logging

Last updated June 16, 2025

Options

Fetching

You can configure the logging level and whether the full URL is logged to the console when running Next.js in development mode.

Currently,logging only applies to data fetching using thefetch API. It does not yet apply to other logs inside of Next.js.

next.config.js
module.exports= {  logging: {    fetches: {      fullUrl:true,    },  },}

Anyfetch requests that are restored from theServer Components HMR cache are not logged by default. However, this can be enabled by settinglogging.fetches.hmrRefreshes totrue.

next.config.js
module.exports= {  logging: {    fetches: {      hmrRefreshes:true,    },  },}

Incoming Requests

By default all the incoming requests will be logged in the console during development. You can use theincomingRequests option to decide which requests to ignore.Since this is only logged in development, this option doesn't affect production builds.

next.config.js
module.exports= {  logging: {    incomingRequests: {      ignore: [/\api\/v1\/health/],    },  },}

Or you can disable incoming request logging by settingincomingRequests tofalse.

next.config.js
module.exports= {  logging: {    incomingRequests:false,  },}

Disabling Logging

In addition, you can disable the development logging by settinglogging tofalse.

next.config.js
module.exports= {  logging:false,}

Was this helpful?

supported.

[8]ページ先頭

©2009-2025 Movatter.jp