Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing logs on mongoTemplate class #4755

Open
rrin8 opened this issue Jul 31, 2024 · 2 comments · May be fixed by #4782
Open

Missing logs on mongoTemplate class #4755

rrin8 opened this issue Jul 31, 2024 · 2 comments · May be fixed by #4782
Assignees
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement

Comments

@rrin8
Copy link

rrin8 commented Jul 31, 2024

Hi,
This is a feedback on the org.springframework.data.mongodb.core.MongoTemplate cass logging.
During some troubleshooting i noticed that in the mongoTemplate class, the doStream method is missing the debug logging of the query executed, the doFind with debug active Instead print the query to be executed.
i also noticed on doFind that the log debug output is missing the sorting parameter (very useful for query optimization) but in other like doFindAndModify there is, maybe the logging is a little inconsistent across the various type of possibile actions.

Is a log check/alignment planned?
Thanks,
Riccardo

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 31, 2024
@christophstrobl christophstrobl added status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 31, 2024
@mp911de
Copy link
Member

mp911de commented Aug 1, 2024

Thanks for reaching out. This is an issue you can help us with if you want to submit a pull request to address the issue.

@marcingrzejszczak marcingrzejszczak self-assigned this Sep 11, 2024
@marcingrzejszczak
Copy link
Contributor

marcingrzejszczak commented Sep 11, 2024

I've done some analysis of that class and logging and this is what we currently have (below list of method names)

No logging

  • stream
  • execute
  • execute through CollectionCallbacks
  • withSession
  • geoNear

With logging

  • executeQuery
  • createCollection (through doCreateCollection)
  • findOne
  • findDistinct
  • findAndModify
  • findAndRemove
  • findAndReplace

I will go through the whole class and ensure that we log as much debug information as it makes sense for all of the public methods (where it makes sense obviously).

@marcingrzejszczak marcingrzejszczak added this to the 4.2.10 (2023.1.10) milestone Sep 12, 2024
@schauder schauder removed this from the 4.2.10 (2023.1.10) milestone Sep 13, 2024
@mp911de mp911de linked a pull request Oct 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants