File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ export function createLogger(
59
59
return options . customLogger
60
60
}
61
61
62
+ const timeFormatter = new Intl . DateTimeFormat ( undefined , {
63
+ hour : 'numeric' ,
64
+ minute : 'numeric' ,
65
+ second : 'numeric' ,
66
+ } )
62
67
const loggedErrors = new WeakSet < Error | RollupError > ( )
63
68
const { prefix = '[vite]' , allowClearScreen = true } = options
64
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 {
82
87
return msg
83
88
}
You can’t perform that action at this time.
0 commit comments