qb_log_format_set(3)

qb_log_format_set3

Set the format specifiers.

Usage

#include <qb/qblog.h>

void qb_log_format_set(
    int32_t       t,
    const char   *format
);

Overview

%n FUNCTION NAME

%f FILENAME

%l FILELINE

%p PRIORITY

%t TIMESTAMP

%T TIMESTAMP with milliseconds

%b BUFFER

%g TAGS

%N name (passed into qb_log_init)

%P PID

%H hostname

Any number between % and character specify field length to pad or chop.

Note

Some of the fields are immediately evaluated and remembered for performance reasons, so whenlog messages carry PIDs (not the default) this function needs to be reinvoked following fork (clone) in the respective children. When already linking with libpthread, pthread_atfork callback registration could be useful.

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.