iscsi\_context\_log\_func\_set(3) API Manual iscsi\_context\_log\_func\_set(3)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

**void iscsi\_context\_log\_func\_set** **(struct iscsi\_context \*ctx,** **void (\*log\_func) (struct iscsi\_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 iscsi\_context'. If this pointer is NULL, your program will be terminated by assert.

[log\_func](#log_func)

Pointer of log handler function.

# [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 [libopeniscsiusr.h(3)](/man/enterprise-packages/open-iscsi/libopeniscsiusr.h.3) for detail usage.

# [RETURN](#RETURN)

void

iscsi\_context\_log\_func\_set October 2026

---

Document: iscsi_context_log_func_set(3) from open-iscsi 2.1.13-r2 (Chainguard OS)
Source: https://github.com/open-iscsi/open-iscsi
