QB_LOG_TA...R_DATA_SET(3)
π qb_log_target_user_data_set β bestie edition π
okay so this is a page from the libqb Programmer's Manual (yes, the libqb girlies, we're in the logging chapter rn) and it's giving very short-and-sweet. the name of the whole thing is QB_LOG_TA...R_DATA_SET(3) β yes the title is truncated like that, no i don't know why, the manpage girlies did that, we respect it π
β¨ NAME β¨
qb_log_target_user_data_set β associate user data with this log target. that's it. that's the whole job. attach ur lil data blob to a target. slay π
β¨ SYNOPSIS β¨
#include <qb/qblog.h>
int32_t qb_log_target_user_data_set(
int32_t t,
void *user_data
);
look at that. two args. t is the target (int32_t bestie) and user_data is a void * because we don't know what ur shoving in there and honestly? not our business. it returns an int32_t. β¨
β¨ DESCRIPTION β¨
okay so the actual prose here is famously minimal, so let me just be real with u: this function associates user data with this log target. the whole description section in the original is basically a single <pink>NOTE</pink> and nothing else, which is iconic honestly, short king behavior π
πΈ NOTE πΈ
only use this with custom targets
like. ONLY. custom targets. not regular targets. custom ones. no cap. if u try to use it elsewhere that's on u bestie π
β¨ SEE ALSO β¨
the girlies this function hangs out with at the function (pun intended π). read these too, fr fr:
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_format(3)qb_log_thread_priority_set(3)qb_log_facility2int(3)qb_log_callsites_register(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)
and yeah, qb_log_target_user_data_get(3) is right there in that list β it's the getter to this setter. the matching set. the duo. the way that they π€. read both, iykyk π
β¨ COPYRIGHT β¨
Copyright (c) 2017 Red Hat, Inc. β shoutout Red Hat, thanks for the code bestie π«Ά
okay that's the whole page, u made it to the end, so proud of u π₯Ή
cute lil sign-off time: this came from LIBQB, dated 2025-09-16, and it lives at QB_LOG_TA...R_DATA_SET(3) in the manual. go set some user data on a custom target and have the best day, mwah πβ¨πΈ
π¦ 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