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(
5959 return options . customLogger
6060 }
6161
62+ const timeFormatter = new Intl . DateTimeFormat ( undefined , {
63+ hour : 'numeric' ,
64+ minute : 'numeric' ,
65+ second : 'numeric' ,
66+ } )
6267 const loggedErrors = new WeakSet < Error | RollupError > ( )
6368 const { prefix = '[vite]' , allowClearScreen = true } = options
6469 const thresh = LogLevels [ level ]
@@ -77,7 +82,7 @@ export function createLogger(
7782 : type === 'warn'
7883 ? colors . yellow ( colors . bold ( prefix ) )
7984 : colors . red ( colors . bold ( prefix ) )
80- return `${ colors . dim ( new Date ( ) . toLocaleTimeString ( ) ) } ${ tag } ${ msg } `
85+ return `${ colors . dim ( timeFormatter . format ( new Date ( ) ) ) } ${ tag } ${ msg } `
8186 } else {
8287 return msg
8388 }
You can’t perform that action at this time.
0 commit comments