Details
-
New Feature
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
None
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.