---
name: "iscsi_context_log_func_set"
section: "3"
platform: "linux"
package: "open-iscsi"
version: "2.1.13-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/iscsi_context_log_func_set"
---

# iscsi\_context\_log\_func\_set(3)

Set log handler function.

## NAME

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

## 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

- ctx

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

- log\_func

  Pointer of log handler function.

## 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)](/libopeniscsiusr.h/3.md) for detail usage.

## RETURN

void
