mongoc_structured_log_entry_get_component()Synopsis
mongoc_structured_log_component_t
mongoc_structured_log_entry_get_component (const mongoc_structured_log_entry_t *entry);
Parameters
• entry: A mongoc_structured_log_entry_t pointer.
Returns
The mongoc_structured_log_component_t associated with this log entry.
SEEALSO:StructuredLoggingmongoc_structured_log_entry_get_level()Synopsis
mongoc_structured_log_level_t
mongoc_structured_log_entry_get_level (const mongoc_structured_log_entry_t *entry);
Parameters
• entry: A mongoc_structured_log_entry_t pointer.
Returns
The mongoc_structured_log_level_t associated with this log entry.
SEEALSO:StructuredLoggingmongoc_structured_log_entry_get_message_string()Synopsis
const char *
mongoc_structured_log_entry_get_message_string (const mongoc_structured_log_entry_t *entry);
Parameters
• entry: A mongoc_structured_log_entry_t pointer.
Returns
A string, guaranteed to be valid only during the lifetime of the structured log handler. It should not
be freed or modified.
Identical to the value of the message key in the document returned by
mongoc_structured_log_entry_message_as_bson().
This is not a complete string representation of the structured log, but rather a standardized identifier
for a particular log event.
SEEALSO:StructuredLoggingmongoc_structured_log_entry_message_as_bson()Synopsis
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.
Parameters
• entry: A mongoc_structured_log_entry_t pointer.
Returns
A new allocated bson_t that must be freed with a call to bson_destroy().
SEEALSO:StructuredLoggingSEEALSO:StructuredLogging