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 β€” a mongoc_structured_log_entry_t pointer.

🌟 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 β€” a mongoc_structured_log_entry_t pointer.

🌟 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 β€” 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.

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 β€” a mongoc_structured_log_entry_t pointer.

🌟 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

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