MONGOC_STRUCT...OG_COMPONENT_T(3)

πŸ’– MONGOC_STRUCT...OG_COMPONENT_T(3) πŸ’–

okay bestie, welcome to the MONGOC_STRUCT...OG_COMPONENT_T(3) page from the libmongoc manual ✨ this one is short and iconic: it's the enum for structured logging components, plus two little lookup functions that go with it. no cap, every detail is here.


✨ SYNOPSIS ✨

typedef enum {
   MONGOC_STRUCTURED_LOG_COMPONENT_COMMAND = 0,
   MONGOC_STRUCTURED_LOG_COMPONENT_TOPOLOGY = 1,
   MONGOC_STRUCTURED_LOG_COMPONENT_SERVER_SELECTION = 2,
   MONGOC_STRUCTURED_LOG_COMPONENT_CONNECTION = 3,
} mongoc_structured_log_component_t;

mongoc_structured_log_component_t enumerates the structured logging components. Applications should never rely on having an exhaustive list of all log components. Instead, use mongoc_structured_log_opts_set_max_level_for_all_components() to set a default level if needed.

bestie warning: don't assume this list of log components is exhaustive β€” the docs literally say so πŸ’…

🌸 FUNCTIONS 🌸

πŸŽ€ mongoc_structured_log_get_component_name()

Synopsis

const char *
mongoc_structured_log_get_component_name (mongoc_structured_log_component_t component);

Parameters

  • component: Log component as a mongoc_structured_log_component_t.

Returns

If the component is known, returns a pointer to a constant string that should not be freed. If the component has no known name, returns NULL.

SEE ALSO: Structured Logging

πŸ¦‹ mongoc_structured_log_get_named_component()

Synopsis

bool
mongoc_structured_log_get_named_component (const char *name, mongoc_structured_log_component_t *out);

Look up a component by name. Case insensitive.

Parameters

  • name: A name to look up as a log component.
  • out: On success, the corresponding mongoc_structured_log_component_t is written here.

Returns

If the component name is known, returns true and writes the component enum to *out. If the component name is not known, returns false and does not write *out.

SEE ALSO: Structured Logging

SEE ALSO: Structured Logging


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc

2009-present, MongoDB, Inc.


that's the whole page, bestie β€” libmongoc version 2.5.6, dated Oct 09, 2026. slay and goodbye πŸ’…βœ¨

πŸ“¦ where this page comes from