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

Don't convert error to string #36804

Merged
merged 4 commits into from May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions packages/next/build/output/log.ts
Expand Up @@ -10,30 +10,30 @@ export const prefixes = {
trace: chalk.magenta('trace') + ' -',
}

export function wait(...message: string[]) {
export function wait(...message: any[]) {
console.log(prefixes.wait, ...message)
}

export function error(...message: string[]) {
export function error(...message: any[]) {
console.error(prefixes.error, ...message)
}

export function warn(...message: string[]) {
export function warn(...message: any[]) {
console.warn(prefixes.warn, ...message)
}

export function ready(...message: string[]) {
export function ready(...message: any[]) {
console.log(prefixes.ready, ...message)
}

export function info(...message: string[]) {
export function info(...message: any[]) {
console.log(prefixes.info, ...message)
}

export function event(...message: string[]) {
export function event(...message: any[]) {
console.log(prefixes.event, ...message)
}

export function trace(...message: string[]) {
export function trace(...message: any[]) {
console.log(prefixes.trace, ...message)
}
6 changes: 3 additions & 3 deletions packages/next/server/dev/next-dev-server.ts
Expand Up @@ -751,11 +751,11 @@ export default class DevServer extends Server {

if (!usedOriginalStack) {
if (type === 'warning') {
Log.warn(err + '')
Log.warn(err)
} else if (type) {
Log.error(`${type}:`, err + '')
Log.error(`${type}:`, err)
} else {
Log.error(err + '')
Log.error(err)
}
}
}
Expand Down