107
A debug version of libpmemobj is provided and available in /usr/lib/pmdk_debug
or /usr/local/lib64/pmdk_debug. The debug version contains runtime assertions and
tracepoints.
The common way to use the debug version is to set the environment variable LD_
LIBRARY_PATH. Alternatively, you can use LD_PRELOAD to point to /usr/lib/pmdk_debug
or /usr/lib64/pmdk_debug, as appropriate. These libraries may reside in a different
location, such as /usr/local/lib/pmdk_debug and /usr/local/lib64/pmdk_debug,
depending on your Linux distribution or if you compiled installed PMDK from source
code and chose /usr/local as the installation path. The following examples are
equivalent methods for loading and using the debug versions of libpmemobj with an
application called my_app:
$ export LD_LIBRARY_PATH=/usr/lib64/pmdk_debug
$ ./my_app
Or
$ LD_PRELOAD=/usr/lib64/pmdk_debug ./my_app
The output provided by the debug library is controlled using the PMEMOBJ_LOG_LEVEL
and PMEMOBJ_LOG_FILE environment variables. These variables have no effect on the
non-debug version of the library.
PMEMOBJ_LOG_LEVEL
The value of PMEMOBJ_LOG_LEVEL enables tracepoints in the debug version of the
library, as follows:
1. This is the default level when PMEMOBJ_LOG_LEVEL is not set. No
log messages are emitted at this level.
2. Additional details on any errors detected are logged, in addition to
returning the errno-based errors as usual. The same information
may be retrieved using pmemobj_errormsg().
3. A trace of basic operations is logged.
4. Enables an extensive amount of function-call tracing in the
library.
5. Enables voluminous and fairly obscure tracing information that is
likely only useful to the libpmemobj developers.
Chapter 7 libpmemobj: a Native traNsaCtioNal objeCt store
Précédent

- 134/457

Suivant