qb_log_ctl2(3)

qb_log_ctl23

Extension of main logging control function accepting also strings.

Usage

#include <qb/qblog.h>

int32_t qb_log_ctl2(
    /*
     * QB_LOG_SYSLOG, QB_LOG_STDERR or result from qb_log_file_open()
     */
    int32_t            target,
    /*
     * configuration directive ("what to configure") that accepts either
     * int32_t or a null-terminated string argument determining the new value unless
     * ignored for particular directive (compatible directives: those valid for
     * qb_log_ctlQB_LOG_CONF_IDENT) 
     */
    enum qb_log_conf   conf_type,
    /*
     * the new value for a state-changing configuration directive, ignored
     * otherwise; for QB_LOG_CONF_IDENT, 's' member as new identifier to openlog(), for
     * all qb_log_ctl-compatible ones, 'i32' member is assumed (although a
     * preferred way is to use that original function directly as it allows for more type
     * safety)
     */
    qb_log_ctl2_arg_t  arg
);

Params

target QB_LOG_SYSLOG, QB_LOG_STDERR or result from qb_log_file_open()

conf_type configuration directive ("what to configure") that accepts either int32_t or a null-terminated string argument determining the new value unless ignored for particular directive (compatible directives: those valid for qb_log_ctlQB_LOG_CONF_IDENT)

arg the new value for a state-changing configuration directive, ignored otherwise; for QB_LOG_CONF_IDENT, 's' member as new identifier to openlog(), for all qb_log_ctl-compatible ones, 'i32' member is assumed (although a preferred way is to use that original function directly as it allows for more type safety)

Overview

Structures

struct qb_log_ctl2_arg_t {
    int32_t       i32;
    const char   *s;
};
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;
};

Note

You can use QB_LOG_CTL2_I32 and QB_LOG_CTL2_S macros for a convenient on-the-fly construction of the object to be passed as an arg argument.

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

From libqb 2.0.10-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.