[JAVA-4752] Easier debugging with standardized logging: logging specification Created: 07/Oct/22  Updated: 28/Oct/23  Resolved: 26/Jan/23

Status: Closed
Project: Java Driver
Component/s: Logging
Affects Version/s: None
Fix Version/s: 4.9.0

Type: New Feature Priority: Major - P3
Reporter: PM Bot Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by JAVA-4840 Support failureIsRedacted in logging ... Closed
is duplicated by JAVA-4829 Misc Updates to Logging Spec Closed
Issue split
split from DRIVERS-1677 Easier debugging with standardized lo... Implementing
Related
is related to JAVA-4486 POC changes needed to implement unifi... Closed
Epic Link: Easier debugging with standardized logging
Quarter: FY23Q4, FY24Q1
Upstream Changes Summary:

DRIVERS-1677:
I suggest that drivers do their implementation of this ticket in tandem with their implementation of DRIVERS-1673 which adds command log messages. This way the driver will have actual log messages to emit and test and can confirm that their logging implementation and test code works as expected.

The logging spec can be found here.

The unified test format changes can be found here. To summarize:

  • Client entities may now have a new observeLogMessages property specifying logging configuration for the client
  • Tests may now have a new expectLogMessages property specifying expected log messages to be produced during the test
  • Two new special matching operators $$matchAsRoot and $$matchAsDocument have been added to enable logging assertions.
     
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   

This ticket was split from DRIVERS-1677, please see that ticket for a detailed description.



 Comments   
Comment by Githook User [ 26/Jan/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Add structured logging support for command logging

  • Align command logging messages to specification
  • Add command logging unified tests

JAVA-4752
JAVA-4753
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2fcd9435df60f131d22ba8b8e9d4d4bb7703fe1e

Comment by Githook User [ 26/Jan/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Add isMonitoringConnection boolean to InternalStreamConnection

This will let us ignore messages (for purposes of log message/event generation)
for monitoring connections

JAVA-4752
JAVA-4753
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fcaf87c0f7399468207fce7d5105eb403a93a0ad

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