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_HANDLER(3) libmongoc MONGOC_STRUCTURED_LOG_OPTS_SET_HANDLER(3)

void
mongoc_structured_log_opts_set_handler (mongoc_structured_log_opts_t *opts,

mongoc_structured_log_func_t log_func,
void *user_data);


Sets the function to be called to handle structured log messages, as a mongoc_structured_log_func_t.

The callback is given a mongoc_structured_log_entry_t as a handle for obtaining additional information about the log message. This entry pointer is only valid during a callback, because it's a low cost reference to temporary data.

Structured log handlers must be thread-safe if they will be used with mongoc_client_pool_t. Handlers must avoid unbounded recursion, preferably by avoiding the use of any libmongoc client or pool which uses the same handler.

This function always replaces the default log handler from mongoc_structured_log_opts_new(), if it was still set. If the log_func is set to NULL, structured logging will be disabled.

  • opts: Structured log options, allocated with mongoc_structured_log_opts_new().
  • log_func: The handler to install, a mongoc_structured_log_func_t, or NULL to disable structured logging.
  • user_data: Optional user data, passed on to the handler.

SEE ALSO:

Structured Logging



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.