MONGOC_STRUCTURED_LOG_ENTRY_T(3)
π¦ MONGOC_STRUCTURED_LOG_ENTRY_T(3) π¦
okay bestie, welcome to the libmongoc manual page for mongoc_structured_log_entry_t β yes, the whole page is about one lil opaque struct, and she is lowkey iconic. β¨
πΈ SYNOPSIS πΈ
typedef struct mongoc_structured_log_entry_t mongoc_structured_log_entry_t;
π DESCRIPTION π
mongoc_structured_log_entry_t is an opaque structure that represents the temporary state of an in-progress log entry. It can only be used during a mongoc_structured_log_func_t, and it is not valid after the log handler returns. Use the functions below to query individual aspects of the log entry. π«Ά
π¨ bestie, this thing is only valid while the handler is running β after it returns, it's not valid. periodt.
π FUNCTIONS π
π 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β amongoc_structured_log_entry_tpointer.
π Returns π
The mongoc_structured_log_component_t associated with this log entry.
SEE ALSO: Structured Logging
π mongoc_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β amongoc_structured_log_entry_tpointer.
π Returns π
The mongoc_structured_log_level_t associated with this log entry.
SEE ALSO: Structured Logging
π mongoc_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β amongoc_structured_log_entry_tpointer.
π Returns π
A string, guaranteed to be valid only during the lifetime of the structured log handler. It should not be freed or modified.
It's 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 β it's a standardized identifier for a particular log event.
SEE ALSO: Structured Logging
π mongoc_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. And bestie, when possible, a log handler should avoid serializing log messages that will be discarded β no wasting effort on stuff that's getting yeeted. Each call allocates an independent copy of the message that must be freed.
π Parameters π
entryβ amongoc_structured_log_entry_tpointer.
π Returns π
A new allocated bson_t that must be freed with a call to bson_destroy().
SEE ALSO: Structured Logging
SEE ALSO: Structured Logging
yes, that's the same SEE ALSO twice β the original page says it twice, so I'm saying it twice too. double the reference, double the slay π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole glow-up, bestie. this page is from libmongoc version 2.5.6, dated Oct 09, 2026 β MONGOC_STRUCTURED_LOG_ENTRY_T(3) and everything. mwah πβ¨
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms