about summary refs log tree commit diff
path: root/src/state/models/root-store.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/root-store.ts')
-rw-r--r--src/state/models/root-store.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts
index 363a81c0f..621c87c11 100644
--- a/src/state/models/root-store.ts
+++ b/src/state/models/root-store.ts
@@ -8,7 +8,6 @@ import {createContext, useContext} from 'react'
 import {DeviceEventEmitter, EmitterSubscription} from 'react-native'
 import {z} from 'zod'
 import {isObj, hasProp} from 'lib/type-guards'
-import {LogModel} from './log'
 import {SessionModel} from './session'
 import {ShellUiModel} from './ui/shell'
 import {HandleResolutionsCache} from './cache/handle-resolutions'
@@ -23,6 +22,7 @@ import {ImageSizesCache} from './cache/image-sizes'
 import {MutedThreads} from './muted-threads'
 import {Reminders} from './ui/reminders'
 import {reset as resetNavigation} from '../../Navigation'
+import {logger} from '#/logger'
 
 // TEMPORARY (APP-700)
 // remove after backend testing finishes
@@ -41,7 +41,7 @@ export type AppInfo = z.infer<typeof appInfo>
 export class RootStoreModel {
   agent: BskyAgent
   appInfo?: AppInfo
-  log = new LogModel()
+  log = logger
   session = new SessionModel(this)
   shell = new ShellUiModel(this)
   preferences = new PreferencesModel(this)
@@ -130,7 +130,7 @@ export class RootStoreModel {
       })
       this.updateSessionState()
     } catch (e: any) {
-      this.log.warn('Failed to initialize session', e)
+      this.log.warn('Failed to initialize session', {error: e})
     }
   }
 
@@ -184,7 +184,7 @@ export class RootStoreModel {
       await this.me.updateIfNeeded()
       await this.preferences.sync()
     } catch (e: any) {
-      this.log.error('Failed to fetch latest state', e)
+      this.log.error('Failed to fetch latest state', {error: e})
     }
   }