QB_LOG_CTL(3)

πŸ’– QB_LOG_CTL(3) πŸ’–

okay bestie, welcome to the QB_LOG_CTL(3) page from the libqb Programmer's Manual! this is literally the main logging control function and it's giving main character energy. no cap. 🫢


🌟 NAME 🌟

qb_log_ctl β€” the main logging control function. periodt. πŸ’…


✨ SYNOPSIS ✨

so you wanna call it? here's the exact vibe, bestie:

       #include <qb/qblog.h>

       int32_t qb_log_ctl(
           /*
            * QB_LOG_SYSLOG, QB_LOG_STDERR or result from qb_log_file_open()
            */
           int32_t           target,
           /*
            * configuration directive ("what to configure") that accepts int32_t
            * argument determining the new value unless ignored for particular directive
            * altogether (incompatible directives: QB_LOG_CONF_IDENT)
            */
           enum qb_log_conf  conf_type,
           /*
            * the new value for a state-changing configuration directive, ignored
            * otherwise
            */
           int32_t           arg
       );

πŸŽ€ PARAMS πŸŽ€

  • target β€” QB_LOG_SYSLOG, QB_LOG_STDERR, or whatever qb_log_file_open() handed you. that's the destination, bestie. ✨
  • conf_type β€” the configuration directive ("what to configure") that takes an int32_t argument to set the new value. heads up: some directives just ignore the argument entirely, and the incompatible one is QB_LOG_CONF_IDENT. so don't @ me if it doesn't care. πŸ™ˆ
  • arg β€” the new value for a state-changing configuration directive. if the directive isn't into that, it's ignored. lowkey chill. πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, the original manpage literally left this section blank. not a single word. so we're keeping it blank too β€” no invented lore, no extra claims, just vibes. iykyk. πŸ’–


🌸 STRUCTURES 🌸

here's the enum qb_log_conf in all its iconic glory:

       enum qb_log_conf {
             QB_LOG_CONF_ENABLED;
             QB_LOG_CONF_FACILITY;
             QB_LOG_CONF_DEBUG;
             QB_LOG_CONF_SIZE;
             QB_LOG_CONF_THREADED;
             QB_LOG_CONF_PRIORITY_BUMP;
             QB_LOG_CONF_STATE_GET;
             QB_LOG_CONF_FILE_SYNC;
             QB_LOG_CONF_EXTENDED;
             QB_LOG_CONF_IDENT;
             QB_LOG_CONF_MAX_LINE_LEN;
             QB_LOG_CONF_ELLIPSIS;
             QB_LOG_CONF_USE_JOURNAL;
       };

slay. that's the whole roster. πŸŽ€


πŸ”₯ RETURN VALUE πŸ”₯

  • -errno β€” on error. it's giving sad girl hours. 😭
  • 0 β€” on success. we love a clean win. πŸ’š

🌈 SEE ALSO 🌈

bestie, go read these too, fr fr:


Copyright (c) 2017 Red Hat, Inc.


and that's the tea, bestie. this page is from LIBQB, dated 2025-09-16, and it's the QB_LOG_CTL(3) manual page. slay, stay logged, and don't forget to vibe check your file descriptors. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from