1pappl-log(3)                pappl logging functions               pappl-log(3)
2
3
4

NAME

6       pappl-log - pappl logging functions
7

LIBRARY

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

SYNOPSIS

13       #include <pappl/pappl.h>
14
15       void
16       papplLog(pappl_system_t *system,  pappl_loglevel_t  level,  const  char
17       *message, ...);
18
19       void
20       papplLogClient(pappl_client_t  *client,  pappl_loglevel_t  level, const
21       char *message, ...);
22
23       void
24       papplLogJob(pappl_job_t *job, pappl_loglevel_t level, const char  *mes‐
25       sage, ...);
26
27       void
28       papplLogPrinter(pappl_printer_t *printer, pappl_loglevel_t level, const
29       char *message, ...);
30

DESCRIPTION

32       The PAPPL logging functions record messages to the configured log file.
33
34       papplLog records messages applying to the system as a whole.
35
36       papplLogClient, papplLogJob, and papplLogPrinter record  messages  spe‐
37       cific to a client connection, print job, or printer respectively.
38
39       The   level   argument   specifies   a   log   level   from   debugging
40       (PAPPL_LOGLEVEL_DEBUG) to fatal (PAPPL_LOGLEVEL_FATAL) and is  used  to
41       determine whether the message is recorded to the log.
42
43       The  message  argument  specifies  the message using a printf(3) format
44       string.
45

ENUMERATIONS

47   pappl_loglevel_e
48       Log levels
49
50       PAPPL_LOGLEVEL_DEBUG
51            Debug message
52
53       PAPPL_LOGLEVEL_ERROR
54            Error message
55
56       PAPPL_LOGLEVEL_FATAL
57            Fatal message
58
59       PAPPL_LOGLEVEL_INFO
60            Informational message
61
62       PAPPL_LOGLEVEL_UNSPEC
63            Not specified
64
65       PAPPL_LOGLEVEL_WARN
66            Warning message
67

FUNCTIONS

69   papplLog
70       Log a message for the system.
71
72       void papplLog (
73           pappl_system_t *system,
74           pappl_loglevel_t level,
75           const char *message,
76           ...
77       );
78
79       This function sends a message to the system's log  file.   The  "level"
80       argument specifies the urgency of the message:
81
82PAPPL_LOGLEVEL_DEBUG: A debugging message.
83
84PAPPL_LOGLEVEL_ERROR: An error message.
85
86PAPPL_LOGLEVEL_FATAL: A fatal error message.
87
88PAPPL_LOGLEVEL_INFO: An informational message.
89
90PAPPL_LOGLEVEL_WARN: A warning message.
91
92       The  "message" argument specifies a printf-style format string.  Values
93       logged using the "%c" and "%s" format specifiers are sanitized  to  not
94       contain control characters.
95
96   papplLogClient
97       Log a message for a client.
98
99       void papplLogClient (
100           pappl_client_t *client,
101           pappl_loglevel_t level,
102           const char *message,
103           ...
104       );
105
106       This  function  sends  a  client message to the system's log file.  The
107       "level" argument specifies the urgency of the message:
108
109PAPPL_LOGLEVEL_DEBUG: A debugging message.
110
111PAPPL_LOGLEVEL_ERROR: An error message.
112
113PAPPL_LOGLEVEL_FATAL: A fatal error message.
114
115PAPPL_LOGLEVEL_INFO: An informational message.
116
117PAPPL_LOGLEVEL_WARN: A warning message.
118
119       The "message" argument specifies a printf-style format string.   Values
120       logged  using  the "%c" and "%s" format specifiers are sanitized to not
121       contain control characters.
122
123   papplLogDevice
124       Log a device error for the system...
125
126       void papplLogDevice (
127           const char *message,
128           void *data
129       );
130
131       This function sends a device error message to the system's log file.
132
133   papplLogJob
134       Log a message for a job.
135
136       void papplLogJob (
137           pappl_job_t *job,
138           pappl_loglevel_t level,
139           const char *message,
140           ...
141       );
142
143       This function sends a job  message  to  the  system's  log  file.   The
144       "level" argument specifies the urgency of the message:
145
146PAPPL_LOGLEVEL_DEBUG: A debugging message.
147
148PAPPL_LOGLEVEL_ERROR: An error message.
149
150PAPPL_LOGLEVEL_FATAL: A fatal error message.
151
152PAPPL_LOGLEVEL_INFO: An informational message.
153
154PAPPL_LOGLEVEL_WARN: A warning message.
155
156       The  "message" argument specifies a printf-style format string.  Values
157       logged using the "%c" and "%s" format specifiers are sanitized  to  not
158       contain control characters.
159
160   papplLogPrinter
161       Log a message for a printer.
162
163       void papplLogPrinter (
164           pappl_printer_t *printer,
165           pappl_loglevel_t level,
166           const char *message,
167           ...
168       );
169
170       This  function  sends  a printer message to the system's log file.  The
171       "level" argument specifies the urgency of the message:
172
173PAPPL_LOGLEVEL_DEBUG: A debugging message.
174
175PAPPL_LOGLEVEL_ERROR: An error message.
176
177PAPPL_LOGLEVEL_FATAL: A fatal error message.
178
179PAPPL_LOGLEVEL_INFO: An informational message.
180
181PAPPL_LOGLEVEL_WARN: A warning message.
182
183       The "message" argument specifies a printf-style format string.   Values
184       logged  using  the "%c" and "%s" format specifiers are sanitized to not
185       contain control characters.
186

TYPES

188   pappl_loglevel_t
189       Log levels
190
191       typedef enum pappl_loglevel_e pappl_loglevel_t;
192

SEE ALSO

194       pappl(1), pappl-client(3), pappl-device(3), pappl-job(3), pappl-log(3),
195       pappl-mainline(3),  pappl-makeresheader(1), pappl-printer(3), pappl-re‐
196       source(3), pappl-system(3), https://www.msweet.org/pappl
197
199       Copyright © 2019-2022 by Michael R Sweet.
200
201       PAPPL is licensed under the Apache License Version  2.0  with  an  (op‐
202       tional)  exception  to  allow linking against GPL2/LGPL2 software (like
203       older versions of CUPS), so it can be used freely in any project  you'd
204       like.   See the files "LICENSE" and "NOTICE" in the source distribution
205       for more information.
206
207
208
2092023-10-06                  pappl logging functions               pappl-log(3)
Impressum