1QB_LOG_CTL2(3) libqb Programmer's Manual QB_LOG_CTL2(3)
2
3
4
6 qb_log_ctl2 - Extension of main logging control function accepting also
7 strings.
8
9
11 #include <qb/qblog.h>
12
13 int32_t qb_log_ctl2(
14 int32_t target, /* QB_LOG_SYSLOG, QB_LOG_STDERR or result from */
15 /*
16 * configuration directive ("what to configure") that accepts either
17 */
18 enum qb_log_conf conf_type,
19 /*
20 * the new value for a state-changing configuration directive, ignored
21 * otherwise; for QB_LOG_CONF_IDENT, 's' member as new identifier to openlog(), for
22 * all qb_log_ctl-compatible ones, 'i32' member is assumed (although a
23 * preferred way is to use that original function directly as it allows for more type
24 * safety)
25 */
26 qb_log_ctl2_arg_t arg
27 );
28
30 target QB_LOG_SYSLOG, QB_LOG_STDERR or result from
31
32 conf_type configuration
33
34 arg the
35
38 struct qb_log_ctl2_arg_t {
39 int32_t i32;
40 const char *s;
41 };
42
43 enum qb_log_conf {
44 QB_LOG_CONF_ENABLED;
45 QB_LOG_CONF_FACILITY;
46 QB_LOG_CONF_DEBUG;
47 QB_LOG_CONF_SIZE;
48 QB_LOG_CONF_THREADED;
49 QB_LOG_CONF_PRIORITY_BUMP;
50 QB_LOG_CONF_STATE_GET;
51 QB_LOG_CONF_FILE_SYNC;
52 QB_LOG_CONF_EXTENDED;
53 QB_LOG_CONF_IDENT;
54 QB_LOG_CONF_MAX_LINE_LEN;
55 QB_LOG_CONF_ELLIPSIS;
56 QB_LOG_CONF_USE_JOURNAL;
57 };
58
60 You can use QB_LOG_CTL2_I32 and QB_LOG_CTL2_S macros for a convenient
61 on-the-fly construction of the object to be passed as an arg argument.
62
64 qb_log_filter_fn_set(3), qb_log_from_external_source_va2(3),
65 qb_log_thread_start(3), qb_log_target_user_data_get(3),
66 qb_log_tags_stringify_fn_set(3), qb_log_file_reopen(3), qb_log_fini(3),
67 qb_log_callsites_dump(3), qb_log_target_user_data_set(3),
68 qb_log_target_format(3), qb_log_thread_priority_set(3),
69 qb_log_facility2int(3), qb_log_callsites_register(3),
70 qb_log_filter_ctl2(3), qb_log_file_close(3), qb_log_format_set(3),
71 qb_log_real_(3), qb_log_from_external_source_va(3),
72 qb_log_callsite_get(3), qb_log_blackbox_write_to_file(3),
73 qb_log_real_va_(3), qb_log_from_external_source(3),
74 qb_log_blackbox_print_from_file(3), qb_log_facility2str(3),
75 qb_log_callsite_get2(3), qb_log_ctl(3), qb_log_filter_ctl(3),
76 qb_log_custom_close(3), qb_log_init(3), qb_log_file_open(3),
77 qb_log_custom_open(3)
78
80 Copyright (c) 2017 Red Hat, Inc.
81
82
83
84LIBQB 2021-11-12 QB_LOG_CTL2(3)