@@ -205,7 +205,6 @@ export const DEFAULT_RETRY_DELAY_MS = 5000;
205205
206206export const DEFAULT_STREAMING_SYNC_OPTIONS = {
207207 retryDelayMs : DEFAULT_RETRY_DELAY_MS ,
208- logger : Logger . get ( 'PowerSyncStream' ) ,
209208 crudUploadThrottleMs : DEFAULT_CRUD_UPLOAD_THROTTLE_MS
210209} ;
211210
@@ -234,6 +233,7 @@ export abstract class AbstractStreamingSyncImplementation
234233 protected abortController : AbortController | null ;
235234 protected crudUpdateListener ?: ( ) => void ;
236235 protected streamingSyncPromise ?: Promise < void > ;
236+ protected logger : ILogger ;
237237
238238 private isUploadingCrud : boolean = false ;
239239 private notifyCompletedUploads ?: ( ) => void ;
@@ -244,6 +244,7 @@ export abstract class AbstractStreamingSyncImplementation
244244 constructor ( options : AbstractStreamingSyncImplementationOptions ) {
245245 super ( ) ;
246246 this . options = { ...DEFAULT_STREAMING_SYNC_OPTIONS , ...options } ;
247+ this . logger = options . logger ?? Logger . get ( 'PowerSyncStream' ) ;
247248
248249 this . syncStatus = new SyncStatus ( {
249250 connected : false ,
@@ -318,10 +319,6 @@ export abstract class AbstractStreamingSyncImplementation
318319 return this . syncStatus . connected ;
319320 }
320321
321- protected get logger ( ) {
322- return this . options . logger ! ;
323- }
324-
325322 async dispose ( ) {
326323 this . crudUpdateListener ?.( ) ;
327324 this . crudUpdateListener = undefined ;
0 commit comments