Skip to content

Commit 7cdef61

Browse files
authored
fix(client): add [vite] prefixes to debug logs (vitejs#20595)
1 parent 77632c5 commit 7cdef61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/vite/src/client/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,25 +402,25 @@ function pingWorkerContentMain(socketUrl: string) {
402402
port.addEventListener('message', (event) => {
403403
const { visibility } = event.data
404404
visibilityManager.currentState = visibility
405-
console.debug('new window visibility', visibility)
405+
console.debug('[vite] new window visibility', visibility)
406406
for (const listener of visibilityManager.listeners) {
407407
listener(visibility)
408408
}
409409
})
410410
port.start()
411411

412-
console.debug('connected from window')
412+
console.debug('[vite] connected from window')
413413
waitForSuccessfulPingInternal(socketUrl, visibilityManager).then(
414414
() => {
415-
console.debug('ping successful')
415+
console.debug('[vite] ping successful')
416416
try {
417417
port.postMessage({ type: 'success' })
418418
} catch (error) {
419419
port.postMessage({ type: 'error', error })
420420
}
421421
},
422422
(error) => {
423-
console.debug('error happened', error)
423+
console.debug('[vite] error happened', error)
424424
try {
425425
port.postMessage({ type: 'error', error })
426426
} catch (error) {

0 commit comments

Comments
 (0)