[JAVA-5061] Configurable Logging length for queries Created: 07/Jul/23  Updated: 10/Oct/23  Resolved: 28/Sep/23

Status: Closed
Project: Java Driver
Component/s: Command Logging and Monitoring
Affects Version/s: 4.3.4
Fix Version/s: None

Type: New Feature Priority: Unknown
Reporter: Aaron Axisa Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JAVA-4841 Support configurable max document len... Closed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Currently, in LoggingCommandEventSender, there is a hardcoded limit of 1000 for the length of the output json (inside getTruncatedJsonCommand() line 64)

The log generated from the line was, at least for me, the only way to see the full query being sent to mongo so I can debug it.  It would be good if the truncating can be turned off / the length can be customised so that the full query is output when needed. 

Currently the only way for me to get the full output was to put a breakpoint there and through the evaluator on my IDE overwrite the jsonWriter with maxLength set to Integer.MAX_VALUE

 



 Comments   
Comment by Jeffrey Yemin [ 28/Sep/23 ]

Sorry we missed this before, but it looks like this duplicates JAVA-4841, which was addressed in the 4.9.0 release of the driver.

Comment by Tom Selander [ 10/Jul/23 ]

aaronaxisa@ecabs.com.mt Thanks for reporting this feature request. We will evaluate this for prioritization next quarter and are backlogging for now.

Comment by PM Bot [ 07/Jul/23 ]

Hi aaronaxisa@ecabs.com.mt, thank you for reporting this issue! The team will look into it and get back to you soon.

Generated at Thu Feb 08 09:03:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.