mongoc_structured_log_opts_set_max_level_for_component

Synopsis

bool
mongoc_structured_log_opts_set_max_level_for_component (mongoc_structured_log_opts_t *opts,
                                                        mongoc_structured_log_component_t component,
                                                        mongoc_structured_log_level_t level);

Sets the maximum log level per-component. Only log messages at or below this severity level will be passed to mongoc_structured_log_func_t <>.

By default, each component's log level may come from environment variables. See mongoc_structured_log_opts_set_max_levels_from_env() <>.

Parameters

Returns

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

See also:

Structured Logging <>

Author

MongoDB, Inc

Info

Mar 04, 2026 2.2.3 libmongoc