MONGOC_STRUCT...ET_NAMED_LEVEL(3)

πŸ’… MONGOC_STRUCT...GET_NAMED_LEVEL(3) πŸ’…

okay bestie, welcome to the libmongoc corner of the manpage universe β€” this one's short and sweet and honestly kind of iconic for it. No cap, it's just a little lookup function that turns a name into a log level. That's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

bool
mongoc_structured_log_get_named_level (const char *name, mongoc_structured_log_level_t *out);

So like… you hand it a name, and it goes looking for a log level with that name. Case insensitive, babes β€” "WARNING", "warning", "WaRnInG", doesn't matter, it does not care about your caps lock situation. πŸ’…


🌸 PARAMETERS 🌸

  • name β€” the name you want looked up as a log level. Just a string, that's it, that's the whole assignment. πŸ¦‹
  • out β€” a pointer to a mongoc_structured_log_level_t. On success, the corresponding level gets written right here. It's giving "output parameter main character energy". ✨

⭐ RETURNS ⭐

Two paths, bestie, and they're very clear about it:

  • If the level name is known β†’ returns true and writes the level enum to *out. Slay. βœ…
  • If the level name is not known β†’ returns false and does not write *out. So like, don't go reading *out expecting a consolation prize, because there isn't one. πŸ™ˆ
fr fr: false means *out is untouched. Treat it as unset, not as "some default level". That's the whole point of the wording.

πŸ‘€ SEE ALSO πŸ‘€

  • Structured Logging

🫢 AUTHOR 🫢

MongoDB, Inc β€” yes, that MongoDB, Inc. Periodt. πŸ‘‘

2009-present, MongoDB, Inc. β€” the whole run, still going. πŸ’œ


and that's the page!! libmongoc 2.5.6, dated Oct 09, 2026 β€” go forth and look up your levels by name, bestie, iykyk πŸŒˆπŸ’–

πŸ“¦ where this page comes from