rpma_log_set_threshold(3) | RPMA Programmer's Manual | rpma_log_set_threshold(3) |
rpma_log_set_threshold - set the logging threshold level
#include <librpma.h> int rpma_log_set_threshold(enum rpma_log_threshold threshold, enum rpma_log_level level); enum rpma_log_level { RPMA_LOG_DISABLED, RPMA_LOG_LEVEL_FATAL, RPMA_LOG_LEVEL_ERROR, RPMA_LOG_LEVEL_WARNING, RPMA_LOG_LEVEL_NOTICE, RPMA_LOG_LEVEL_INFO, RPMA_LOG_LEVEL_DEBUG, }; enum rpma_log_threshold { RPMA_LOG_THRESHOLD, RPMA_LOG_THRESHOLD_AUX, RPMA_LOG_THRESHOLD_MAX };
rpma_log_set_threshold() sets the logging threshold level.
Available thresholds are:
Available threshold levels are defined by enum rpma_log_level:
The default logging function writes messages to syslog(3) and to stderr(3), where syslog(3) is the primary destination (RPMA_LOG_THRESHOLD applies) whereas stderr(3) is the secondary destination (RPMA_LOG_THRESHOLD_AUX applies).
rpma_log_syslog_set_threshold() function returns 0 on success or a negative error code on failure.
rpma_log_set_threshold() can fail with the following errors:
rpma_log_get_threshold(3), rpma_log_set_function(3), librpma(7) and https://pmem.io/rpma/
29 October 2024 | RPMA |