@@ -207,13 +207,13 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
207207 var table = clientDB . GetTable ( tableName ) ;
208208 if ( table == null )
209209 {
210- Logger . LogError ( $ "Unknown table name: { tableName } ") ;
210+ Log . Error ( $ "Unknown table name: { tableName } ") ;
211211 continue ;
212212 }
213213
214214 if ( update . Deletes . Count != 0 )
215215 {
216- Logger . LogWarning ( "Non-insert during a subscription update!" ) ;
216+ Log . Warn ( "Non-insert during a subscription update!" ) ;
217217 }
218218
219219 var hashSet = GetInsertHashSet ( table . ClientTableType , initialSubscription . DatabaseUpdate . Tables . Count ) ;
@@ -240,7 +240,7 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
240240 break ;
241241
242242 case EncodedValue . Text ( var txt ) :
243- Logger . LogWarning ( "JavaScript messages are unsupported." ) ;
243+ Log . Warn ( "JavaScript messages are unsupported." ) ;
244244 break ;
245245 }
246246 }
@@ -261,7 +261,7 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
261261 var table = clientDB . GetTable ( tableName ) ;
262262 if ( table == null )
263263 {
264- Logger . LogError ( $ "Unknown table name: { tableName } ") ;
264+ Log . Error ( $ "Unknown table name: { tableName } ") ;
265265 continue ;
266266 }
267267
@@ -279,7 +279,7 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
279279 {
280280 if ( ( op . insert is not null && oldOp . insert is not null ) || ( op . delete is not null && oldOp . delete is not null ) )
281281 {
282- Logger . LogWarning ( $ "Update with the same primary key was applied multiple times! tableName={ tableName } ") ;
282+ Log . Warn ( $ "Update with the same primary key was applied multiple times! tableName={ tableName } ") ;
283283 // TODO(jdetter): Is this a correctable error? This would be a major error on the
284284 // SpacetimeDB side.
285285 continue ;
@@ -315,7 +315,7 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
315315 {
316316 if ( ( op . insert is not null && oldOp . insert is not null ) || ( op . delete is not null && oldOp . delete is not null ) )
317317 {
318- Logger . LogWarning ( $ "Update with the same primary key was applied multiple times! tableName={ tableName } ") ;
318+ Log . Warn ( $ "Update with the same primary key was applied multiple times! tableName={ tableName } ") ;
319319 // TODO(jdetter): Is this a correctable error? This would be a major error on the
320320 // SpacetimeDB side.
321321 continue ;
@@ -348,13 +348,13 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
348348 }
349349 catch ( Exception e )
350350 {
351- Logger . LogException ( e ) ;
351+ Log . Exception ( e ) ;
352352 }
353353 break ;
354354 case UpdateStatus . Failed ( var failed ) :
355355 break ;
356356 case UpdateStatus . OutOfEnergy ( var outOfEnergy ) :
357- Logger . LogWarning ( "Failed to execute reducer: out of energy." ) ;
357+ Log . Warn ( "Failed to execute reducer: out of energy." ) ;
358358 break ;
359359 default :
360360 throw new InvalidOperationException ( ) ;
@@ -368,7 +368,7 @@ HashSet<byte[]> GetInsertHashSet(System.Type tableType, int tableSize)
368368
369369 if ( ! waitingOneOffQueries . Remove ( messageId , out var resultSource ) )
370370 {
371- Logger . LogError ( $ "Response to unknown one-off-query: { messageId } ") ;
371+ Log . Error ( $ "Response to unknown one-off-query: { messageId } ") ;
372372 break ;
373373 }
374374
@@ -442,7 +442,7 @@ public void Connect(string? token, string uri, string addressOrName)
442442 uri = $ "ws://{ uri } ";
443443 }
444444
445- Logger . Log ( $ "SpacetimeDBClient: Connecting to { uri } { addressOrName } ") ;
445+ Log . Info ( $ "SpacetimeDBClient: Connecting to { uri } { addressOrName } ") ;
446446 Task . Run ( async ( ) =>
447447 {
448448 try
@@ -453,11 +453,11 @@ public void Connect(string? token, string uri, string addressOrName)
453453 {
454454 if ( connectionClosed )
455455 {
456- Logger . Log ( "Connection closed gracefully." ) ;
456+ Log . Info ( "Connection closed gracefully." ) ;
457457 return ;
458458 }
459459
460- Logger . LogException ( e ) ;
460+ Log . Exception ( e ) ;
461461 }
462462 } ) ;
463463 }
@@ -476,7 +476,7 @@ private void OnMessageProcessCompleteUpdate(ReducerEvent? dbEvent, List<DbOp> db
476476 }
477477 catch ( Exception e )
478478 {
479- Logger . LogException ( e ) ;
479+ Log . Exception ( e ) ;
480480 }
481481 }
482482 }
@@ -541,7 +541,7 @@ private void OnMessageProcessCompleteUpdate(ReducerEvent? dbEvent, List<DbOp> db
541541 }
542542 catch ( Exception e )
543543 {
544- Logger . LogException ( e ) ;
544+ Log . Exception ( e ) ;
545545 }
546546 }
547547 }
@@ -566,7 +566,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
566566 }
567567 catch ( Exception e )
568568 {
569- Logger . LogException ( e ) ;
569+ Log . Exception ( e ) ;
570570 }
571571 break ;
572572 case ServerMessage . TransactionUpdate ( var transactionUpdate ) :
@@ -581,7 +581,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
581581 var requestId = transactionUpdate . ReducerCall . RequestId ;
582582 if ( ! stats . ReducerRequestTracker . FinishTrackingRequest ( requestId ) )
583583 {
584- Logger . LogWarning ( $ "Failed to finish tracking reducer request: { requestId } ") ;
584+ Log . Warn ( $ "Failed to finish tracking reducer request: { requestId } ") ;
585585 }
586586 }
587587 OnMessageProcessCompleteUpdate ( processed . reducerEvent , dbOps ) ;
@@ -591,7 +591,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
591591 }
592592 catch ( Exception e )
593593 {
594- Logger . LogException ( e ) ;
594+ Log . Exception ( e ) ;
595595 }
596596
597597 if ( processed . reducerEvent is not { } reducerEvent )
@@ -607,7 +607,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
607607 }
608608 catch ( Exception e )
609609 {
610- Logger . LogException ( e ) ;
610+ Log . Exception ( e ) ;
611611 }
612612
613613 if ( ! reducerFound && transactionUpdate . Status is UpdateStatus . Failed ( var failed ) )
@@ -618,7 +618,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
618618 }
619619 catch ( Exception e )
620620 {
621- Logger . LogException ( e ) ;
621+ Log . Exception ( e ) ;
622622 }
623623 }
624624 break ;
@@ -631,7 +631,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
631631 }
632632 catch ( Exception e )
633633 {
634- Logger . LogException ( e ) ;
634+ Log . Exception ( e ) ;
635635 }
636636 break ;
637637 case ServerMessage . OneOffQueryResponse :
@@ -641,7 +641,7 @@ private void OnMessageProcessComplete(PreProcessedMessage preProcessed)
641641 }
642642 catch ( Exception e )
643643 {
644- Logger . LogException ( e ) ;
644+ Log . Exception ( e ) ;
645645 }
646646
647647 break ;
@@ -659,7 +659,7 @@ public void InternalCallReducer<T>(T args)
659659 {
660660 if ( ! webSocket . IsConnected )
661661 {
662- Logger . LogError ( "Cannot call reducer, not connected to server!" ) ;
662+ Log . Error ( "Cannot call reducer, not connected to server!" ) ;
663663 return ;
664664 }
665665
@@ -677,7 +677,7 @@ public void Subscribe(List<string> queries)
677677 {
678678 if ( ! webSocket . IsConnected )
679679 {
680- Logger . LogError ( "Cannot subscribe, not connected to server!" ) ;
680+ Log . Error ( "Cannot subscribe, not connected to server!" ) ;
681681 return ;
682682 }
683683
@@ -714,13 +714,13 @@ public async Task<T[]> OneOffQuery<T>(string query)
714714
715715 if ( ! stats . OneOffRequestTracker . FinishTrackingRequest ( requestId ) )
716716 {
717- Logger . LogWarning ( $ "Failed to finish tracking one off request: { requestId } ") ;
717+ Log . Warn ( $ "Failed to finish tracking one off request: { requestId } ") ;
718718 }
719719
720720 T [ ] LogAndThrow ( string error )
721721 {
722722 error = $ "While processing one-off-query `{ queryString } `, ID { messageId } : { error } ";
723- Logger . LogError ( error ) ;
723+ Log . Error ( error ) ;
724724 throw new Exception ( error ) ;
725725 }
726726
0 commit comments