---
name: "mongoc_structured_log_opts_get_max_level_for_component"
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_get_max_level_for_component"
---

# mongoc\_structured\_log\_opts\_get\_max\_level\_for\_component(3)

## SYNOPSIS

```
mongoc_structured_log_level_t
mongoc_structured_log_opts_get_max_level_for_component (const mongoc_structured_log_opts_t *opts,
                                                        mongoc_structured_log_component_t component);
```

## PARAMETERS

- •

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

- •

  **component**: Log component as a *mongoc\_structured\_log\_component\_t*.

## RETURNS

Returns the configured maximum log level for a specific component, as a *mongoc\_structured\_log\_level\_t*. This may be the last value set with *mongoc\_structured\_log\_opts\_set\_max\_level\_for\_component()* or *mongoc\_structured\_log\_opts\_set\_max\_level\_for\_all\_components()*, or it may be the default obtained from environment variables. If an invalid or unknown component enum is given, returns the lowest log level.

**SEE ALSO:**

```
Structured Logging
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
