---
name: "openpam_log"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/openpam_log"
---

# openpam\_log(3)

log a message through syslog

## NAME

**openpam\_log** – log a message through syslog

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<security/pam\_appl.h\>**

**#include \<security/openpam.h\>**

*void*\

**openpam\_log**(*int level*, *const char \*fmt*, *...*);

## DESCRIPTION

The **openpam\_log**() function logs messages using [syslog(3)](/syslog/3.md). It is primarily intended for internal use by the library and modules.

The *level* argument indicates the importance of the message. The following levels are defined:

- PAM\_LOG\_LIBDEBUG

  Debugging messages. For internal use only.

- PAM\_LOG\_DEBUG

  Debugging messages. These messages are normally not logged unless the global integer variable *openpam\_debug* is set to a non-zero value, in which case they are logged with a [syslog(3)](/syslog/3.md) priority of LOG\_DEBUG.

- PAM\_LOG\_VERBOSE

  Information about the progress of the authentication process, or other non-essential messages. These messages are logged with a [syslog(3)](/syslog/3.md) priority of LOG\_INFO.

- PAM\_LOG\_NOTICE

  Messages relating to non-fatal errors. These messages are logged with a [syslog(3)](/syslog/3.md) priority of LOG\_NOTICE.

- PAM\_LOG\_ERROR

  Messages relating to serious errors. These messages are logged with a [syslog(3)](/syslog/3.md) priority of LOG\_ERR.

The remaining arguments are a [printf(3)](/printf/3.md) format string and the corresponding arguments.

The **openpam\_log**() function does not modify the value of *errno*.

## SEE ALSO

[pam(3)](/pam/3.md), [printf(3)](/printf/3.md), [syslog(3)](/syslog/3.md)

## STANDARDS

The **openpam\_log**() function is an OpenPAM extension.

## AUTHORS

The **openpam\_log**() function and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.

The OpenPAM library is maintained by Dag-Erling Smørgrav ⟨*des@des.dev*⟩.
