pappl-log(3)

pappl-log3

Pappl logging functions

Usage

#include <pappl/pappl.h>

void
papplLog(pappl_system_t *system, pappl_loglevel_t level, const char *message, ...);

void
papplLogClient(pappl_client_t *client, pappl_loglevel_t level, const char *message, ...);

void
papplLogJob(pappl_job_t *job, pappl_loglevel_t level, const char *message, ...);

void
papplLogPrinter(pappl_printer_t *printer, pappl_loglevel_t level, const char *message, ...);

Library

Printer Application Framework (libpappl, "pkg-config --cflags --libs pappl")

Overview

The PAPPL logging functions record messages to the configured log file.

papplLog records messages applying to the system as a whole.

papplLogClient, papplLogJob, and papplLogPrinter record messages specific to a client connection, print job, or printer respectively.

The level argument specifies a log level from debugging (PAPPL_LOGLEVEL_DEBUG) to fatal (PAPPL_LOGLEVEL_FATAL) and is used to determine whether the message is recorded to the log.

The message argument specifies the message using a printf(3) format string.

Enumerations

pappl_loglevel_e

Log levels

PAPPL_LOGLEVEL_DEBUG

Debug message

PAPPL_LOGLEVEL_ERROR

Error message

PAPPL_LOGLEVEL_FATAL

Fatal message

PAPPL_LOGLEVEL_INFO

Informational message

PAPPL_LOGLEVEL_UNSPEC

Not specified

PAPPL_LOGLEVEL_WARN

Warning message

Functions

papplLog

Log a message for the system.

void papplLog (
    pappl_system_t *system,
    pappl_loglevel_t level,
    const char *message,
    ...
);

This function sends a message to the system's log file. The "level" argument specifies the urgency of the message:

•

PAPPL_LOGLEVEL_DEBUG: A debugging message.

•

PAPPL_LOGLEVEL_ERROR: An error message.

•

PAPPL_LOGLEVEL_FATAL: A fatal error message.

•

PAPPL_LOGLEVEL_INFO: An informational message.

•

PAPPL_LOGLEVEL_WARN: A warning message.

The "message" argument specifies a printf-style format string. Values logged using the "%c" and "%s" format specifiers are sanitized to not contain control characters.

papplLogClient

Log a message for a client.

void papplLogClient (
    pappl_client_t *client,
    pappl_loglevel_t level,
    const char *message,
    ...
);

This function sends a client message to the system's log file. The "level" argument specifies the urgency of the message:

•

PAPPL_LOGLEVEL_DEBUG: A debugging message.

•

PAPPL_LOGLEVEL_ERROR: An error message.

•

PAPPL_LOGLEVEL_FATAL: A fatal error message.

•

PAPPL_LOGLEVEL_INFO: An informational message.

•

PAPPL_LOGLEVEL_WARN: A warning message.

The "message" argument specifies a printf-style format string. Values logged using the "%c" and "%s" format specifiers are sanitized to not contain control characters.

papplLogDevice

Log a device error for the system...

void papplLogDevice (
    const char *message,
    void *data
);

This function sends a device error message to the system's log file.

papplLogJob

Log a message for a job.

void papplLogJob (
    pappl_job_t *job,
    pappl_loglevel_t level,
    const char *message,
    ...
);

This function sends a job message to the system's log file. The "level" argument specifies the urgency of the message:

•

PAPPL_LOGLEVEL_DEBUG: A debugging message.

•

PAPPL_LOGLEVEL_ERROR: An error message.

•

PAPPL_LOGLEVEL_FATAL: A fatal error message.

•

PAPPL_LOGLEVEL_INFO: An informational message.

•

PAPPL_LOGLEVEL_WARN: A warning message.

The "message" argument specifies a printf-style format string. Values logged using the "%c" and "%s" format specifiers are sanitized to not contain control characters.

papplLogPrinter

Log a message for a printer.

void papplLogPrinter (
    pappl_printer_t *printer,
    pappl_loglevel_t level,
    const char *message,
    ...
);

This function sends a printer message to the system's log file. The "level" argument specifies the urgency of the message:

•

PAPPL_LOGLEVEL_DEBUG: A debugging message.

•

PAPPL_LOGLEVEL_ERROR: An error message.

•

PAPPL_LOGLEVEL_FATAL: A fatal error message.

•

PAPPL_LOGLEVEL_INFO: An informational message.

•

PAPPL_LOGLEVEL_WARN: A warning message.

The "message" argument specifies a printf-style format string. Values logged using the "%c" and "%s" format specifiers are sanitized to not contain control characters.

Types

pappl_loglevel_t

Log levels

typedef enum pappl_loglevel_e pappl_loglevel_t;

Releases

4 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12–13
  3. Arch

From pappl 1.4.12-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.