MONGOC_STRUCTU..._FOR_COMPONENT(3)
π MONGOC_STRUCTU..._FOR_COMPONENT(3)
okay so this is a page out of libmongoc (yes, the MongoDB C driver, we love her), and it's all about one very specific little function: mongoc_structured_log_opts_get_max_level_for_component. bestie, the header got truncated by the man page formatter so it literally reads MONGOC_STRUCTU..._FOR_COMPONENT(3) β that's not a typo, that's just how it's printed. iconic honestly. π
β¨ 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);
like, she takes your opts, she takes a component, she hands you back a log level. no notes. π
πΈ PARAMETERS πΈ
optsβ the structured log options π«Ά β and listen, these have to be allocated withmongoc_structured_log_opts_new(), so don't be out here passing random garbage, iykyk.componentβ the log component you're asking about, typed as amongoc_structured_log_component_t. that's the vibe check of "which part of the library are we talking about rn". π
β RETURNS β
She returns the configured maximum log level for that one specific component, as a mongoc_structured_log_level_t. β¨
And where does that value come from? lowkey could be any of these, no cap:
- the last value you set with
mongoc_structured_log_opts_set_max_level_for_component() - the last value you set with
mongoc_structured_log_opts_set_max_level_for_all_components() - or the default you picked up from environment variables π
π¨ important caveat bestie: if you hand her an invalid or unknown component enum, she returns the lowest log level. so like, don't expect a big fancy answer for a component that isn't real. π
SEE ALSO:
- Structured Logging π
π AUTHOR π
MongoDB, Inc β the whole entire company, credited, slay. π₯
π COPYRIGHT π
2009-present, MongoDB, Inc.
okay that's the whole page, mwah π β this was libmongoc version 2.5.6, dated Oct 09 per the footer at the bottom of the original page (the year got kinda eaten by the column formatting, rip π). go forth and log responsibly, bestie π¦π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms