PMEMOBJ_LOG_GET_THRESHOLD(3)
π 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()returns0and 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 notPMEMOBJ_LOG_THRESHOLDnorPMEMOBJ_LOG_THRESHOLD_AUX. so like, you passed it something it does not recognise, bestie. πEINVALβ value isNULL. 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
- fedora 43: libpmemobj-devel 2.1.0-4.fc43 Β· BSD-3-Clause
- π the page's license: BSD-3-Clause
- Copyright 2024, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms