pappl-log(3)
β¨ pappl-log β the logging bestie of libpappl β¨
okay so. you're out here writing a printer application with PAPPL and you need your code to say things into a log file, right? that's literally this whole manual page, bestie. pappl-log(3) is the family of functions that write messages into your configured log file, and we're gonna go through every single one of them together, no skips, no skimming, periodt. π
πΈ LIBRARY πΈ
Printer Application Framework (libpappl, "pkg-config --cflags --libs pappl")
like, that's the whole vibe. link against it, you're in. π«Ά
π 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, ...);
four functions, all variadic, all eating a level and a format string. iconic honestly. π
π¦ DESCRIPTION π¦
The PAPPL logging functions record messages to the configured log file. that's the whole job description, and they ate.
papplLog records messages applying to the system as a whole. it's the big-picture one, the main character. π
papplLogClient, papplLogJob, and papplLogPrinter record messages specific to a client connection, print job, or printer respectively. so like, three little specialists for three little scopes. π
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. so the level isn't just decoration, it literally decides if your message makes the cut. vibe check, fr fr. π₯
The message argument specifies the message using a printf(3) format string. yes bestie, full printf energy, %s and all. β¨
π ENUMERATIONS π
π pappl_loglevel_e β Log levels
PAPPL_LOGLEVEL_DEBUGβ Debug message. the "hey i'm just snooping around in here" tier. πPAPPL_LOGLEVEL_ERRORβ Error message. something went wrong, be sad about it. πPAPPL_LOGLEVEL_FATALβ Fatal message. oh no. the worst one. πPAPPL_LOGLEVEL_INFOβ Informational message. just vibing, sharing facts. β¨PAPPL_LOGLEVEL_UNSPECβ Not specified. undecided. mysterious. πPAPPL_LOGLEVEL_WARNβ Warning message. heads up bestie, this might get ugly. β οΈ
π§ 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. yes bestie, the control characters get scrubbed, no sneaky \n nonsense in your log. π§Όβ¨
β 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. same sanitizing deal, every single time. π
β 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. note that this one's in the FUNCTIONS crew but not in the SYNOPSIS, so don't come for me, i'm just reporting the facts. π
β 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. your print jobs get the same glow-up treatment. π¨οΈπ
β 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. and yeah, printers too. all four of the printf-style ones sanitize identically, that's just the house style. πΈ
π TYPES π
π
pappl_loglevel_t β Log levels
typedef enum pappl_loglevel_e pappl_loglevel_t;
that's it. that's the type. a little typedef so you don't have to type enum every time. we love a convenience. π
π₯ 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
(yes, pappl-log(3) references itself. she's self-aware. main character energy fr.) πβ¨
π 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. so like, go build stuff, it's fine, just read those two files. π«Ά
and that's the whole page bestie, you made it to the end, so proud of you. π₯Ή this was pappl-log(3) from the pappl logging functions, dated 2026-08-11. go log something cute, and remember: the level argument is not optional and neither is reading the license. bye bestie!! ππ¦πβ¨
π¦ where this page comes from
- arch rolling: pappl 1.4.12-1 Β· Apache-2.0 WITH LLVM-exception
- fedora 43: pappl-devel 1.4.12-1.fc43 Β· Apache-2.0 WITH LLVM-exception
- fedora 43: pappl-devel 1.4.12-1.fc43 Β· Apache-2.0 WITH LLVM-exception
- fedora 44: pappl-devel 1.4.12-1.fc44 Β· Apache-2.0 WITH LLVM-exception
- fedora 44: pappl-devel 1.4.12-1.fc44 Β· Apache-2.0 WITH LLVM-exception
- nixpkgs unstable: pappl 1.4.12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms