---
name: "mongoc_structured_log_func_t"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_structured_log_func_t"
---

# mongoc\_structured\_log\_func\_t(3)

## SYNOPSIS

```
typedef void (*mongoc_structured_log_func_t)
(const mongoc_structured_log_entry_t *entry, void *user_data);
```

Callback function for *mongoc\_structured\_log\_opts\_set\_handler()*. 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.

## PARAMETERS

- •

  **entry**: A *mongoc\_structured\_log\_entry\_t* pointer, only valid during the handler invocation.

- •

  **user\_data**: Optional user data from *mongoc\_structured\_log\_opts\_set\_handler()*.

**SEE ALSO:**

```
Structured Logging
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
