DOKK / manpages / debian 13 / libmongoc-doc / mongoc_structured_log_entry_message_as_bson.3.en
MONGOC_STRUCTURED_LOG_ENTRY_MESSAGE_AS_BSON(3) libmongoc MONGOC_STRUCTURED_LOG_ENTRY_MESSAGE_AS_BSON(3)

bson_t *
mongoc_structured_log_entry_message_as_bson (const mongoc_structured_log_entry_t *entry);


Make a new copy, as a bson_t, of the log entry's standardized BSON representation. When possible, a log handler should avoid serializing log messages that will be discarded. Each call allocates an independent copy of the message that must be freed.

entry: A mongoc_structured_log_entry_t pointer.

A new allocated bson_t that must be freed with a call to bson_destroy().

SEE ALSO:

Structured Logging



MongoDB, Inc

2009-present, MongoDB, Inc.

May 7, 2025 1.30.4