Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
MONGOC_STRUCTU...TS_SET_HANDLER(3) libmongocMONGOC_STRUCTU...TS_SET_HANDLER(3)

SYNOPSIS
	  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	refer-
       ence 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, prefer-
       ably 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.

PARAMETERS
        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

AUTHOR
       MongoDB,	Inc

COPYRIGHT
       2009-present, MongoDB, Inc.

1.30.2				 Apr 12, 202MONGOC_STRUCTU...TS_SET_HANDLER(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mongoc_structured_log_opts_set_handler&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help