diff options
author | Eric Bailey <git@esb.lol> | 2023-11-04 13:12:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-04 13:12:46 -0500 |
commit | e49a3d8a564b2aa42a8c0e66dfcbae27d096dc26 (patch) | |
tree | f3b498168963bc9b945428f16c309670b18602d4 /src/lib/hooks/useOTAUpdate.ts | |
parent | 46c2564e6531712538e44ee6880fb4bfce612ab9 (diff) | |
parent | 0c76866757367953cc6e7cc8c9ad9fcfdb00a862 (diff) | |
download | voidsky-e49a3d8a564b2aa42a8c0e66dfcbae27d096dc26.tar.zst |
Merge pull request #1813 from bluesky-social/eric/app-903-extract-logger-into-singleton
Add new logger
Diffstat (limited to 'src/lib/hooks/useOTAUpdate.ts')
-rw-r--r-- | src/lib/hooks/useOTAUpdate.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/hooks/useOTAUpdate.ts b/src/lib/hooks/useOTAUpdate.ts index 5155a808f..d7855b2d4 100644 --- a/src/lib/hooks/useOTAUpdate.ts +++ b/src/lib/hooks/useOTAUpdate.ts @@ -34,18 +34,18 @@ export function useOTAUpdate() { // show a popup modal showUpdatePopup() } catch (e) { - console.error('useOTAUpdate: Error while checking for update', e) - store.log.error('useOTAUpdate: Error while checking for update', e) + store.log.error('useOTAUpdate: Error while checking for update', { + error: e, + }) } }, [showUpdatePopup, store.log]) const updateEventListener = useCallback( (event: Updates.UpdateEvent) => { store.log.debug('useOTAUpdate: Listening for update...') if (event.type === Updates.UpdateEventType.ERROR) { - store.log.error( - 'useOTAUpdate: Error while listening for update', - event.message, - ) + store.log.error('useOTAUpdate: Error while listening for update', { + message: event.message, + }) } else if (event.type === Updates.UpdateEventType.NO_UPDATE_AVAILABLE) { // Handle no update available // do nothing |