MONGOC_STRUCTU...OCUMENT_LENGTH(3)
π MONGOC_STRUCTU...OCUMENT_LENGTH(3) π
okay so bestie, welcome to the libmongoc manual page for mongoc_structured_log_opts_set_max_document_length() β yes, that name is a whole mouthful, but itβs literally the βplease donβt let my serialized JSON get hugeβ knob. π
β¨ SYNOPSIS β¨
bool
mongoc_structured_log_opts_set_max_document_length (mongoc_structured_log_opts_t *opts,
size_t max_document_length);
π DESCRIPTION π
This function sets a maximum length for BSON documents that appear serialized in JSON form as part of a structured log message.
Serialized JSON gets truncated at this limit, and the limit is interpreted as a count of UTF-8 encoded bytes. Truncation is indicated with a ... suffix, and the length of that suffix is not included in the max document length. If truncation at the exact indicated length would split a valid UTF-8 sequence, the document gets truncated earlier instead β at the nearest boundary between code points. iykyk, no partial characters allowed. π§
π PARAMETERS π
optsβ structured log options, allocated withmongoc_structured_log_opts_new().max_document_lengthβ maximum length for each embedded JSON document, in bytes, not including an ellipsis (...) added to indicate truncation. Values near or aboveINT_MAXwill be rejected. π«Ά
π¦ RETURNS π¦
Returns true on success, or false if the supplied maximum length is too large.
π₯ SEE ALSO π₯
- Structured Logging
mongoc_structured_log_opts_set_max_document_length_from_env()
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
mwah π this page is from libmongoc version 2.5.6, dated Oct 09, 202 β periodt, go slay those structured logs π β¨
π¦ 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