---
name: "mongoc_structured_log_opts_set_max_level_for_all_components"
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_opts_set_max_level_for_all_components"
---

# mongoc\_structured\_log\_opts\_set\_max\_level\_for\_all\_components(3)

## SYNOPSIS

```
bool
mongoc_structured_log_opts_set_max_level_for_all_components (mongoc_structured_log_opts_t *opts,
                                                             mongoc_structured_log_level_t level);
```

Sets all per-component maximum log levels to the same value. Only log messages at or below this severity level will be passed to *mongoc\_structured\_log\_func\_t*. Effective even for logging components not known at compile-time.

## PARAMETERS

- •

  **opts**: Structured log options, allocated with *mongoc\_structured\_log\_opts\_new()*.

- •

  **level**: The max log level for all components, as a *mongoc\_structured\_log\_level\_t*.

## RETURNS

Returns **true** on success, or **false** if the supplied parameters were incorrect.

**SEE ALSO:**

```
Structured Logging
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
