@@ -562,8 +562,8 @@ protected void executeQuery(Query query, String collectionName, DocumentCallback
562562 Document fieldsObject = query .getFieldsObject ();
563563
564564 if (LOGGER .isDebugEnabled ()) {
565- LOGGER .debug (String .format ("Executing query: %s sort : %s fields : %s in collection: %s" ,
566- serializeToJsonSafely (queryObject ), sortObject , fieldsObject , collectionName ));
565+ LOGGER .debug (String .format ("Executing query: %s fields : %s sort : %s in collection: %s" ,
566+ serializeToJsonSafely (queryObject ), fieldsObject , serializeToJsonSafely ( sortObject ) , collectionName ));
567567 }
568568
569569 this .executeQueryInternal (new FindCallback (createDelegate (query ), queryObject , fieldsObject , null ),
@@ -2591,7 +2591,8 @@ protected <S, T> List<T> doFind(String collectionName,
25912591
25922592 if (LOGGER .isDebugEnabled ()) {
25932593 LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2594- serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , entityClass , collectionName ));
2594+ serializeToJsonSafely (mappedQuery ), mappedFields , serializeToJsonSafely (mappedSort ), entityClass ,
2595+ collectionName ));
25952596 }
25962597
25972598 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ),
@@ -2617,7 +2618,8 @@ <S, T> List<T> doFind(CollectionPreparer<MongoCollection<Document>> collectionPr
26172618
26182619 if (LOGGER .isDebugEnabled ()) {
26192620 LOGGER .debug (String .format ("find using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2620- serializeToJsonSafely (mappedQuery ), mappedSort , mappedFields , sourceClass , collectionName ));
2621+ serializeToJsonSafely (mappedQuery ), mappedFields , serializeToJsonSafely (mappedSort ), sourceClass ,
2622+ collectionName ));
26212623 }
26222624
26232625 return executeFindMultiInternal (new FindCallback (collectionPreparer , mappedQuery , mappedFields , null ), preparer ,
@@ -2699,7 +2701,7 @@ protected <T> T doFindAndRemove(CollectionPreparer collectionPreparer, String co
26992701
27002702 if (LOGGER .isDebugEnabled ()) {
27012703 LOGGER .debug (String .format ("findAndRemove using query: %s fields: %s sort: %s for class: %s in collection: %s" ,
2702- serializeToJsonSafely (query ), fields , sort , entityClass , collectionName ));
2704+ serializeToJsonSafely (query ), fields , serializeToJsonSafely ( sort ) , entityClass , collectionName ));
27032705 }
27042706
27052707 MongoPersistentEntity <?> entity = mappingContext .getPersistentEntity (entityClass );
@@ -2730,7 +2732,8 @@ protected <T> T doFindAndModify(CollectionPreparer collectionPreparer, String co
27302732 if (LOGGER .isDebugEnabled ()) {
27312733 LOGGER .debug (String .format (
27322734 "findAndModify using query: %s fields: %s sort: %s for class: %s and update: %s in collection: %s" ,
2733- serializeToJsonSafely (mappedQuery ), fields , sort , entityClass , serializeToJsonSafely (mappedUpdate ),
2735+ serializeToJsonSafely (mappedQuery ), fields , serializeToJsonSafely (sort ), entityClass ,
2736+ serializeToJsonSafely (mappedUpdate ),
27342737 collectionName ));
27352738 }
27362739
0 commit comments