-
Mar 25th, 2011, 12:19 PM
#1
How to Log Query String for Mongo
Hey There,
I'm trying to see why my query is returning no results... and would like to see the exact query executed. I tried to get this to log by adding
log4j.category.org.springframework.data.document=T RACE
to my log4j.properties i get SOME extra logging but not the query.
Is there a way to list the query that is being executed?
Thanks!
Dave
-
Mar 29th, 2011, 01:44 PM
#2
Do you refer to the repositories? Actually, MongoQueryCreator logs the query it creates into DEBUG level. If you'd like to see more logging output inside MongoTemplate feel free to open a JIRA.
Regards,
Ollie
-
Apr 6th, 2011, 07:40 PM
#3
I just added some debug logging to the MongoTemplate's find methods. So if you enable DEBUG for org.springframework.data.document.mongodb you should see the query being used.
-
Apr 7th, 2011, 03:23 PM
#4
Thanks..
Thanks, that helps a lot. I can see the template queries now. -D
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules