We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitejs
Learn more about funding links in repositories.
Report abuse
1 parent 6251a66 commit af53a1dCopy full SHA for af53a1d
packages/vite/src/node/logger.ts
@@ -59,6 +59,11 @@ export function createLogger(
59
return options.customLogger
60
}
61
62
+ const timeFormatter = new Intl.DateTimeFormat(undefined, {
63
+ hour: 'numeric',
64
+ minute: 'numeric',
65
+ second: 'numeric',
66
+ })
67
const loggedErrors = new WeakSet<Error | RollupError>()
68
const { prefix = '[vite]', allowClearScreen = true } = options
69
const thresh = LogLevels[level]
@@ -77,7 +82,7 @@ export function createLogger(
77
82
: type === 'warn'
78
83
? colors.yellow(colors.bold(prefix))
79
84
: colors.red(colors.bold(prefix))
80
- return `${colors.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`
85
+ return `${colors.dim(timeFormatter.format(new Date()))} ${tag} ${msg}`
81
86
} else {
87
return msg
88
0 commit comments