dmmp\_context\_log\_func\_set(3) Device Mapper Multipath API - libdmmp Manual dmmp\_context\_log\_func\_set(3)

# [NAME](#NAME)

dmmp\_context\_log\_func\_set - Set log handler function.

# [SYNOPSIS](#SYNOPSIS)

**void dmmp\_context\_log\_func\_set** **(struct dmmp\_context \*ctx,** **void (\*log\_func) (struct dmmp\_context \*ctx, int priority, const char \*file, int line, const char \*func\_name, const char \*format, va\_list args));**

# [ARGUMENTS](#ARGUMENTS)

[ctx](#ctx)

Pointer of 'struct dmmp\_context'. If this pointer is NULL, your program will be terminated by assert.

[log\_func](#log_func)

Pointer of log handler function. If set to NULL, all log will be ignored.

# [DESCRIPTION](#DESCRIPTION)

Set custom log handler. The log handler will be invoked when log message is equal or more important(less value) than log priority setting. Please check manpage [libdmmp.h(3)](/man/os/multipath-tools/libdmmp.h.3) for detail usage.

# [RETURN](#RETURN)

void

dmmp\_context\_log\_func\_set June 2025

---

Document: dmmp_context_log_func_set(3) from multipath-tools 0.15.1-r0 (Chainguard OS)
Source: https://github.com/opensvc/multipath-tools
