QB_LOG_TARGET_FORMAT(3)

✨ QB_LOG_TARGET_FORMAT ✨

okay bestie, so this one lives in the libqb Programmer's Manual, and it's all about making your log lines look cute β€” well, look formatted, anyway πŸ’…


πŸŽ€ NAME πŸŽ€

qb_log_target_format β€” it formats the callsite and timestamp info according to the format. that's literally the whole job, no cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qb/qblog.h>

void qb_log_target_format(
    int32_t                   target,
    struct qb_log_callsite   *cs,
    struct timespec          *timestamp,
    const char               *formatted_message,
    char                     *output_buffer
);

🌸 DESCRIPTION 🌸

so the format you're working with here is the one that got set using qb_log_format_set(). and the whole point of this function is that it's intended to be used from your custom logger function 🫢 like, your logger, the one you wrote, calls this to get the pretty version out. iconic behavior honestly.


πŸ’– STRUCTURES πŸ’–

An instance of this structure is created for each log message with the message-id. periodt.

struct qb_log_callsite {
    const char   *function;
    const char   *filename;
    const char   *format;
    uint8_t       priority;
    uint32_t      lineno;
    uint32_t      targets;
    uint32_t      tags;
    const char   *message_id;
};

like... every single log message gets one of these. it's giving main character energy for real πŸ’«


πŸ”₯ SEE ALSO πŸ”₯

bestie there are SO many. grab a snack πŸ“


Copyright (c) 2017 Red Hat, Inc.


and that's the whole page, bestie!! this one's from libqb, dated 2025-09-16, and it's version-tagged as LIBQB at the bottom like a little signature πŸ’œ anyway go format some logs, you're gonna ate it up fr fr πŸŽ€βœ¨

πŸ“¦ where this page comes from