GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MONGOC_STRUCTURED_LOG_OPTS_SET_MAX_DOCUMENT_LENGTH(3) libmongoc MONGOC_STRUCTURED_LOG_OPTS_SET_MAX_DOCUMENT_LENGTH(3)

bool
mongoc_structured_log_opts_set_max_document_length (mongoc_structured_log_opts_t *opts,

size_t max_document_length);


Sets a maximum length for BSON documents that appear serialized in JSON form as part of a structured log message.

Serialized JSON will be truncated at this limit, interpreted as a count of UTF-8 encoded bytes. Truncation will be indicated with a ... suffix, the length of which is not included in the max document length. If truncation at the exact indicated length would split a valid UTF-8 sequence, we instead truncate the document earlier at the nearest boundary between code points.

  • opts: Structured log options, allocated with mongoc_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 above INT_MAX will be rejected.

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()



MongoDB, Inc

2009-present, MongoDB, Inc.

July 3, 2025 1.30.4

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.