---
name: "openpam_log"
section: "3"
platform: "macos"
package: "OpenPAM"
version: "35"
release: "macOS 26.5"
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

## LIBRARY

library “libpam”

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

  Debugging messages. These messages 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.

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