[MONGOCRYPT-47] Add logging for libmongocrypt Created: 26/Apr/19  Updated: 28/Oct/23  Resolved: 01/Jul/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

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

Epic Link: Build libmongocrypt library

 Description   

Add comprehensive logging to libmongocrypt.

Some background:

  • drivers that use libmongocrypt can set a log callback to receive log messages (using this public API).
  • right now we only log things with log level MONGOCRYPT_LOG_LEVEL_TRACE, using a convenience macro CRYPT_TRACEF.
  • we should log all input arguments and output arguments of all public API (anything defined in mongocrypt.h), probably with MONGOCRYPT_LOG_LEVEL_INFO.
  • for a mongocrypt_binary_t, how we log it depends on what it stores. If it represents BSON, we convert it to a bson_t first, and print the BSON representation with something like bson_as_json.
  • consider anything else worth logging. If it turns out we don't need all five log levels, we could consider removing some.


 Comments   
Comment by Githook User [ 01/Jul/19 ]

Author:

{'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3102 add back logging for libmongocrypt

This reverts commit cb3f76a5a2fd7184ac4bf4aee9f3255b09771305 and applies
some additional changes:

Comment by Githook User [ 12/Jun/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: Revert "CDRIVER-3102 Add logging for libmongocrypt (#14)"

This reverts commit 60bf80b15fdcfb726992632fa1451bda7dc03fbf.
Branch: master
https://github.com/mongodb/libmongocrypt/commit/cb3f76a5a2fd7184ac4bf4aee9f3255b09771305

Comment by Githook User [ 06/Jun/19 ]

Author:

{'name': 'bazile-clyde', 'email': '34226620+bazile-clyde@users.noreply.github.com', 'username': 'bazile-clyde'}

Message: CDRIVER-3102 Add logging for libmongocrypt (#14)
Branch: master
https://github.com/mongodb/libmongocrypt/commit/60bf80b15fdcfb726992632fa1451bda7dc03fbf

Comment by Ian Whalen (Inactive) [ 30/Apr/19 ]

would be great if this can include docs about what is being logged at each level. Please talk with the team about where to do this.

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