NNG_LOG_GET_LEVEL(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

✨ nng_log_get_level(3) ✨

okay bestie, pull up a seat πŸ’– this one is from the NNG Reference Manual, and it's genuinely short and sweet. It's nng_log_get_level(3) β€” yes, the name is the whole vibe: we're getting a level, not setting it. iykyk.


πŸŽ€ NAME πŸŽ€

nng_log_get_level β€” get the minimum level for logging messages πŸ‘‘

🌸 SYNOPSIS 🌸

#include <nng/nng.h>

typedef enum nng_log_level {
        NNG_LOG_NONE   = 0, // used for filters only, NNG suppresses these
        NNG_LOG_ERR    = 3,
        NNG_LOG_WARN   = 4,
        NNG_LOG_NOTICE = 5,
        NNG_LOG_INFO   = 6,
        NNG_LOG_DEBUG  = 7
} nng_log_level;

nng_log_level nng_log_set_level(void);
not me staring at that last line πŸ™ˆ it literally says nng_log_set_level in the synopsis of the get page. bestie, that is what the page says, so that is what we're writing down, character for character. no editing, no cap. πŸ’€

πŸ’… DESCRIPTION πŸ’…

so the nng_log_get_level function is the one you call to find out the minimum severity level that's actually being processed for log messages. it's giving "vibe check but for log levels" ✨

and the intended use case? oh she's practical. it's so you can skip the expensive stuff β€” all those operations you'd only ever do to build up debugging info for the logs β€” when that logged content would just get thrown away anyway. no point doing all that work just to have it discarded, bestie. that's wasted main character energy. 🫢

so: ask first, then decide whether it's even worth building the message. iconic behavior honestly.

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie!! short, sweet, slayed. this was nng_log_get_level(3) from the NNG Reference Manual, dated 2026-06-30. go forth and check your log levels before you do the expensive thing πŸ’–βœŒοΈ

πŸ“¦ where this page comes from