Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5061

Configurable Logging length for queries

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 4.3.4
    • None
    • Hide

      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?

      Show
      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?

      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

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            aaronaxisa@ecabs.com.mt Aaron Axisa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: