QB_LOG_CA...S_REGISTER(3)
β¨ QB_LOG_CA...S_REGISTER(3) β¨
okay bestie, welcome to the libqb Programmer's Manual π this one's called qb_log_callsites_register and it's giving "my plugin has trust issues" energy. let's get into it πΈ
π NAME π
qb_log_callsites_register β okay so picture this: you're using dynamically loadable modules via dlopen() and you load them after qb_log_init() π then after you load the module you will need to do the following to get the filters to work in that module. that's literally it, that's the whole job. she's a fixer π₯
π SYNOPSIS π
#include <qb/qblog.h>
int32_t qb_log_callsites_register(
struct qb_log_callsite *_start,
struct qb_log_callsite *_stop
);
π¦ DESCRIPTION π¦
so like, here's the vibe, fr fr:
_start = dlsym (dl_handle, QB_ATTR_SECTION_START_STR);
_stop = dlsym (dl_handle, QB_ATTR_SECTION_STOP_STR);
qb_log_callsites_register(_start, _stop);
that's the move. grab your _start and _stop out of the dl_handle with dlsym, then hand them over to qb_log_callsites_register. filters? working. slay β¨
π STRUCTURES π
an instance of this structure is created for each log message with the message-id. iconic behaviour honestly π«Ά
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;
};
π SEE ALSO π
besties, the whole group chat is here, no cap:
qb_log_filter_fn_set(3)qb_log_from_external_source_va2(3)qb_log_thread_start(3)qb_log_target_user_data_get(3)qb_log_tags_stringify_fn_set(3)qb_log_file_reopen(3)qb_log_fini(3)qb_log_callsites_dump(3)qb_log_ctl2(3)qb_log_target_user_data_set(3)qb_log_target_format(3)qb_log_thread_priority_set(3)qb_log_facility2int(3)qb_log_filter_ctl2(3)qb_log_file_close(3)qb_log_format_set(3)qb_log_real_(3)qb_log_from_external_source_va(3)qb_log_callsite_get(3)qb_log_blackbox_write_to_file(3)qb_log_real_va_(3)qb_log_from_external_source(3)qb_log_blackbox_print_from_file(3)qb_log_facility2str(3)qb_log_callsite_get2(3)qb_log_ctl(3)qb_log_filter_ctl(3)qb_log_custom_close(3)qb_log_init(3)qb_log_file_open(3)qb_log_custom_open(3)
π COPYRIGHT π
Copyright (c) 2017 Red Hat, Inc.
and that's the whole page, periodt π mwah π this lil baddie is brought to you by LIBQB, dated 2025-09-16, and she ate π
β¨
π¦ where this page comes from
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- fedora 44: libqb-devel 2.0.9-2.fc44 Β· LGPL-2.1-or-later
- ubuntu resolute: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu stonking: libqb-dev 2.0.9-1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms