QB_LOG_FR...NAL_SOURCE(3)
π QB_LOG_FR...NAL_SOURCE(3) π
okay so bestie, we're in the libqb Programmer's Manual today and this one is literally the β¨bridgeβ¨ function β it's how you pull logs in from other code (think libraries π) that hand you a callback stuffed with their own log messages. no cap.
πΈ NAME πΈ
qb_log_from_external_source β this function is to import logs from other code (like libraries) that provide a callback with their logs. fr fr that's the whole job description π
β¨ SYNOPSIS β¨
#include <qb/qblog.h>
void qb_log_from_external_source(
const char *function, /* originating function name */
const char *filename, /* originating filename */
const char *format, /* format string */
uint8_t priority, /* this takes syslog priorities. */
uint32_t lineno, /* file line number */
/*
* this is a uint32_t that you can use with
* qb_log_tags_stringify_fn_set() to "tag" a log message with a feature or sub-system then you can use
* "%g" in the format specifer to print it out.
*/
uint32_t tags,
...
);
like, look at that signature. it ate. π
π¦ PARAMS π¦
functionβ originating function namefilenameβ originating filenameformatβ format stringpriorityβ this takes syslog priorities.linenoβ file line numbertagsβ this is auint32_tthat you can use withqb_log_tags_stringify_fn_set()to "tag" a log message with a feature or sub-system then you can use"%g"in the format specifer to print it out.
(null)
yeah girl, that last line is just... sitting there. iykyk. moving on π
π DESCRIPTION π
this is the function you call when some other chunk of code β a library, a dependency, a mysterious little guy you didn't write β gives you a callback full of logs and you wanna funnel those straight into libqb. iconic behavior honestly π
π NOTE π
okay so heads up bestie: the performance of this will not impress you π because the filtering is done on each log message, not beforehand. so try doing basic pre-filtering. like, protect your CPU. she's trying her best. π«Ά
π SEE ALSO π
the whole extended family, in all their glory:
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_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_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, bestie!! π this dropped as part of libqb with the 2025-09-16 date on it, and you read the entire thing, so slay. go log something. periodt. β¨π¦π
π¦ 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