Go to main content

man pages section 3: DAX Library Functions

Exit Print View

Updated: July 2017
 
 

dax_set_log (3DAX)

Name

dax_set_log - set logging options

Synopsis

cc [ flag... ] file... -ldax [ library...]

#include <dax.h> 

dax_status_t
dax_set_log(dax_context_t *ctx, uint64_t options);

Description

This function sets options for logging messages in the libdax functions that use ctx.

The following are the values for the options parameter, and they can be logically OR'd together:

DAX_LOG_ERROR

Print error messages

DAX_LOG_WARN

Print warning messages. A warning message does not necessarily mean that there is an error.

DAX_LOG_ENTRY

Print arguments on entry to a libdax function

DAX_LOG_RETURN

Print results on return from a libdax function

DAX_LOG_PERF

Print performance data and advice

DAX_LOG_VERBOSE

Print additional information during execution of a libdax function

DAX_LOG_ALL

Enable all logging options

Sends messages enabled by options to the syslog(3C) log at the user.debug priority level. Stops sending messages to the file specified by dax_set_log_file() if it had been called, and stops sending messages to the callback handler specified by dax_set_log_callback() if it had been called.

Continues to send messages enabled by DAX_LOG_OPTIONS to the target defined by the DAX_LOG_OPTIONS and DAX_LOG_FD environment variables at dax_thread_init() time.

Disables an option if it is not specified either in options or in DAX_DEBUG_OPTIONS.

Log messages only serve as an aid to debug problems. The format of all log messages is not defined and can change in future versions.

If the function returns an error, does not change log options.

Return Values

DAX_SUCCESS

Operation completed successfully

DAX_EINVAL

Unrecognized flag in the options

DAX_ETHREAD

The calling thread did not create ctx

Usage

The DAX_LOG_ERROR option prints detailed diagnostics for DAX_EINVAL errors.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library
Interface Stability
Committed

See Also

libdax(3LIB), dax_set_log_file(3DAX), dax_set_log_callback(3DAX)