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/state/models/feeds/notifications.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/state/models/feeds/notifications.ts')
-rw-r--r-- | src/state/models/feeds/notifications.ts | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/state/models/feeds/notifications.ts b/src/state/models/feeds/notifications.ts index 34f5d4add..a834b543a 100644 --- a/src/state/models/feeds/notifications.ts +++ b/src/state/models/feeds/notifications.ts @@ -220,7 +220,7 @@ export class NotificationsFeedItemModel { } this.rootStore.log.warn( 'app.bsky.notifications.list served an unsupported record type', - v, + {record: v}, ) } @@ -401,7 +401,9 @@ export class NotificationsFeedModel { this._setQueued(this._filterNotifications(queueModels)) this._countUnread() } catch (e) { - this.rootStore.log.error('NotificationsModel:syncQueue failed', {e}) + this.rootStore.log.error('NotificationsModel:syncQueue failed', { + error: e, + }) } finally { this.lock.release() } @@ -481,7 +483,9 @@ export class NotificationsFeedModel { this.lastSync ? this.lastSync.toISOString() : undefined, ) } catch (e: any) { - this.rootStore.log.warn('Failed to update notifications read state', e) + this.rootStore.log.warn('Failed to update notifications read state', { + error: e, + }) } } @@ -501,13 +505,12 @@ export class NotificationsFeedModel { this.error = cleanError(error) this.loadMoreError = cleanError(loadMoreError) if (error) { - this.rootStore.log.error('Failed to fetch notifications', error) + this.rootStore.log.error('Failed to fetch notifications', {error}) } if (loadMoreError) { - this.rootStore.log.error( - 'Failed to load more notifications', - loadMoreError, - ) + this.rootStore.log.error('Failed to load more notifications', { + error: loadMoreError, + }) } } |