Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(server): improve dev logs formatting #41109

Merged
merged 1 commit into from Oct 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/next/server/dev/next-dev-server.ts
Expand Up @@ -178,7 +178,7 @@ export default class DevServer extends Server {
})
}
if (fs.existsSync(pathJoin(this.dir, 'static'))) {
console.warn(
Log.warn(
`The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecated`
)
}
Expand Down Expand Up @@ -207,7 +207,7 @@ export default class DevServer extends Server {
// Makes `next export` exportPathMap work in development mode.
// So that the user doesn't have to define a custom server reading the exportPathMap
if (this.nextConfig.exportPathMap) {
console.log('Defining routes from exportPathMap')
Log.info('Defining routes from exportPathMap')
const exportPathMap = await this.nextConfig.exportPathMap(
{},
{
Expand All @@ -231,7 +231,7 @@ export default class DevServer extends Server {
Object.keys(urlQuery)
.filter((key) => query[key] === undefined)
.forEach((key) =>
console.warn(
Log.warn(
`Url '${path}' defines a query parameter '${key}' that is missing in exportPathMap`
)
)
Expand Down Expand Up @@ -613,7 +613,7 @@ export default class DevServer extends Server {
reject(e)
resolved = true
} else {
console.warn('Failed to reload dynamic routes:', e)
Log.warn('Failed to reload dynamic routes:', e)
}
}
})
Expand Down