PMEMOBJ_LOG_GET_THRESHOLD(3)

πŸ“¦
version 2.1.0 Β· 2 versions
, in fedora 43

πŸ’– pmemobj_log_get_threshold β€” get the logging threshold value πŸ’–

okay bestie, so this is a page from the PMDK Programmer's Manual (that's Persistent Memory Development Kit, for the uninitiated β€” iykyk) and it's all about peeking at how loud your pmemobj logging is being. no cap, it's a tiny little function and it's lowkey iconic for it. πŸ¦‹


✨ SYNOPSIS ✨

#include <libpmemobj.h>

int pmemobj_log_get_threshold(enum pmemobj_log_threshold threshold,
    enum pmemobj_log_level *value);

🌸 DESCRIPTION 🌸

so pmemobj_log_get_threshold() does exactly one thing and it does it flawlessly: it gets the current value of the threshold. that's it. that's the whole vibe. πŸ’…

like, if you wanna know what thresholds and values even exist in the first place, go read pmemobj_log_set_threshold(3) β€” that's where all the options live, and this function is just the read-only bestie that reports back what's currently set. 🫢


πŸŽ€ RETURN VALUE πŸŽ€

here's the tea:

  • on success, pmemobj_log_get_threshold() returns 0 and writes into value the current value of the threshold. slay. βœ…
  • on failure, it returns a non-zero value and sets errno. πŸ™ˆ
⚠️ and in case of failure, the contents of value is undefined β€” so don't go reading it like it means something, because it does NOT. it's giving chaos, honestly. πŸ’€

πŸ’œ ERRORS πŸ’œ

pmemobj_log_get_threshold() can fail with the following errors:

  • EINVAL β€” threshold is not PMEMOBJ_LOG_THRESHOLD nor PMEMOBJ_LOG_THRESHOLD_AUX. so like, you passed it something it does not recognise, bestie. 😭
  • EINVAL β€” value is NULL. yeah you gotta actually give it somewhere to put the answer. πŸ“

🌈 SEE ALSO 🌈


and that's the whole page, periodt. ✨ this was PMDK, dated 2025-07-24 β€” mwah, take care of your thresholds and your thresholds will take care of you πŸ’–πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from