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

Add interpolation to unstructured logging

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 4.10.0
    • Affects Version/s: None
    • Component/s: Logging
    • 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?

      The conditional logging statements can become quite cumbersome. As alternative, we could use special formatting similar to SLF4j but extended for our needs. This new format could use }} placeholders for values and {{[] placeholders for conditionals. We could enclose parts of the sentences within conditionals like [ with service-id {}], meaning that if the value is null, the entire sentence within brackets would be omitted.

            Assignee:
            slav.babanin@mongodb.com Slav Babanin
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: