Provided by: libpappl-dev_1.2.1-1_amd64 bug

NAME

       pappl-log - pappl logging functions

LIBRARY

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

SYNOPSIS

       #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,
       ...);

DESCRIPTION

       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;

SEE ALSO

       pappl(1), pappl-client(3), pappl-device(3), pappl-job(3), pappl-log(3), pappl-mainline(3),
       pappl-makeresheader(1),     pappl-printer(3),     pappl-resource(3),      pappl-system(3),
       https://www.msweet.org/pappl

COPYRIGHT

       Copyright © 2019-2022 by Michael R Sweet.

       PAPPL  is  licensed  under  the Apache License Version 2.0 with an (optional) exception to
       allow linking against GPL2/LGPL2 software (like older versions of CUPS), so it can be used
       freely  in  any  project  you'd  like.  See the files "LICENSE" and "NOTICE" in the source
       distribution for more information.