@@ -564,8 +564,8 @@ protected void executeQuery(Query query, String collectionName, DocumentCallback
564564 Document fieldsObject = query .getFieldsObject ();
565565
566566 if (LOGGER .isDebugEnabled ()) {
567- LOGGER .debug (String .format ("Executing query: %s sort : %s fields : %s in collection: %s" ,
568- serializeToJsonSafely (queryObject ), sortObject , fieldsObject , collectionName ));
567+ LOGGER .debug (String .format ("Executing query: %s fields : %s sort : %s in collection: %s" ,
568+ serializeToJsonSafely (queryObject ), fieldsObject , serializeToJsonSafely ( sortObject ) , collectionName ));
569569 }
570570
571571 this .executeQueryInternal (new FindCallback (createDelegate (query ), queryObject , fieldsObject , null ),
@@ -2599,7 +2599,8 @@ protected <S, T> List<T> doFind(String collectionName,
25992599
26002600 if (LOGGER .isDebugEnabled ()) {
26012601 LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2602- serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , entityClass , collectionName ));
2602+ serializeToJsonSafely (mappedQuery ), mappedFields , serializeToJsonSafely (mappedSort ), entityClass ,
2603+ collectionName ));
26032604 }
26042605
26052606 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2625,7 +2626,8 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
26252626
26262627 if (LOGGER .isDebugEnabled ()) {
26272628 LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2628- serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , sourceClass , collectionName ));
2629+ serializeToJsonSafely (mappedQuery ), mappedFields , serializeToJsonSafely (mappedSort ), sourceClass ,
2630+ collectionName ));
26292631 }
26302632
26312633 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
@@ -2707,7 +2709,7 @@ protected <T> T doFindAndRemove(CollectionPreparer collectionPreparer, String co
27072709
27082710 if (LOGGER .isDebugEnabled ()) {
27092711 LOGGER .debug (String .format ("findAndRemove using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2710- serializeToJsonSafely (query ), fields , sort , entityClass , collectionName ));
2712+ serializeToJsonSafely (query ), fields , serializeToJsonSafely ( sort ) , entityClass , collectionName ));
27112713 }
27122714
27132715 MongoPersistentEntity <?> entity = mappingContext .getPersistentEntity (entityClass );
@@ -2738,7 +2740,8 @@ protected <T> T doFindAndModify(CollectionPreparer collectionPreparer, String co
27382740 if (LOGGER .isDebugEnabled ()) {
27392741 LOGGER .debug (String .format (
27402742 "findAndModify using query: %s fields: %s sort: %s for class: %s and update: %s in collection: %s" ,
2741- serializeToJsonSafely (mappedQuery ), fields , sort , entityClass , serializeToJsonSafely (mappedUpdate ),
2743+ serializeToJsonSafely (mappedQuery ), fields , serializeToJsonSafely (sort ), entityClass ,
2744+ serializeToJsonSafely (mappedUpdate ),
27422745 collectionName ));
27432746 }
27442747
0 commit comments