Queries in MongoTemplate Logs with ObjectId Format. #4873
Labels
status: ideal-for-contribution
An issue that a contributor can help us with
type: enhancement
A general enhancement
When any operations made through MongoTemplate, I set the log level to DEBUG using the following configuration:
logging.level.org.springframework.data.mongodb.core.MongoTemplate=DEBUG.
This allows me to view the queries executed by MongoTemplate, which is helpful. However, the issue is that the query logs display ObjectId in the oid format, which cannot be directly executed in the MongoDB Compass client.
Is there a way to log the queries in the ObjectId("") format instead? I couldn’t find a solution for this issue. If a solution already exists, please let me know. If not, it would be great to have this functionality implemented.
The text was updated successfully, but these errors were encountered: