mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 04:24:43 -04:00
Improve Logging (#1519)
Improve Logging Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
1172a1d7b8
commit
0e512531a0
41 changed files with 361 additions and 92 deletions
|
@ -19,6 +19,9 @@ import { ExpirationPlugin } from 'workbox-expiration'
|
|||
import { createHandlerBoundToURL, precacheAndRoute } from 'workbox-precaching'
|
||||
import { registerRoute } from 'workbox-routing'
|
||||
import { StaleWhileRevalidate } from 'workbox-strategies'
|
||||
import { Logger } from './utils/logger'
|
||||
|
||||
const log = new Logger('ServiceWorker')
|
||||
|
||||
declare const self: ServiceWorkerGlobalScope
|
||||
|
||||
|
@ -80,7 +83,7 @@ registerRoute(
|
|||
self.addEventListener('message', (event) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
||||
self.skipWaiting().catch((e) => console.error(e))
|
||||
self.skipWaiting().catch((e) => log.error(e))
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue