diff --git a/src/include/libpmemobj/log.h b/src/include/libpmemobj/log.h index 657819f018a..ce426142e4f 100644 --- a/src/include/libpmemobj/log.h +++ b/src/include/libpmemobj/log.h @@ -20,11 +20,14 @@ extern "C" { enum pmemobj_log_level { /* only basic library info */ PMEMOBJ_LOG_LEVEL_HARK, - /* an error that causes the library to stop working immediately */ + /* an error that causes the program to stop working immediately */ PMEMOBJ_LOG_LEVEL_FATAL, - /* an error that causes the library to stop working properly */ + /* an error that causes the current operation or transaction to fail */ PMEMOBJ_LOG_LEVEL_ERROR, - /* an errors that could be handled in the upper level */ + /* + * an unexpected situation that does NOT cause + * the current operation to fail + */ PMEMOBJ_LOG_LEVEL_WARNING, /* non-massive info mainly related to public API function completions */ PMEMOBJ_LOG_LEVEL_NOTICE, @@ -36,8 +39,9 @@ enum pmemobj_log_level { enum pmemobj_log_threshold { /* - * the main threshold level - the logging messages above this level - * won't trigger the logging functions + * the main threshold level - the logging messages less severe than + * indicated by this threshold's value won't trigger the logging + * functions */ PMEMOBJ_LOG_THRESHOLD, /* diff --git a/src/libpmemobj/obj_log.c b/src/libpmemobj/obj_log.c index aad0ad0f11a..ad3791c1844 100644 --- a/src/libpmemobj/obj_log.c +++ b/src/libpmemobj/obj_log.c @@ -10,26 +10,26 @@ #include "util.h" /* - * pmemobj_log_set_threshold -- set the log level threshold + * pmemobj_log_set_threshold -- set the logging threshold value */ int pmemobj_log_set_threshold(enum pmemobj_log_threshold threshold, - enum pmemobj_log_level level) + enum pmemobj_log_level value) { int ret = core_log_set_threshold((enum core_log_threshold)threshold, - (enum core_log_level)level); + (enum core_log_level)value); return core_log_error_translate(ret); } /* - * pmemobj_log_get_threshold -- get the log level threshold + * pmemobj_log_get_threshold -- get the logging value threshold value */ int pmemobj_log_get_threshold(enum pmemobj_log_threshold threshold, - enum pmemobj_log_level *level) + enum pmemobj_log_level *value) { int ret = core_log_get_threshold((enum core_log_threshold)threshold, - (enum core_log_level *)level); + (enum core_log_level *)value); return core_log_error_translate(ret); }