1QB_LOG_CTL2(3)             libqb Programmer's Manual            QB_LOG_CTL2(3)
2
3
4

NAME

6       qb_log_ctl2 - Extension of main logging control function accepting also
7       strings.
8
9

SYNOPSIS

11       #include <qb/qblog.h>
12
13       int32_t qb_log_ctl2(
14           /*
15            * QB_LOG_SYSLOG, QB_LOG_STDERR or result from qb_log_file_open()
16            */
17           int32_t            target,
18           /*
19            * configuration directive ("what to configure") that accepts either
20            * int32_t or a null-terminated string argument determining the new value unless
21            * ignored for particular directive (compatible directives: those valid for
22            * qb_log_ctlQB_LOG_CONF_IDENT)
23
24            */
25           enum qb_log_conf   conf_type,
26           /*
27            * the new value for a state-changing configuration directive, ignored
28            * otherwise; for QB_LOG_CONF_IDENT, 's' member as new identifier to openlog(), for
29            * all qb_log_ctl-compatible ones, 'i32' member is assumed (although a
30            * preferred way is to use that original function directly as it allows for more type
31            * safety)
32            */
33           qb_log_ctl2_arg_t  arg
34       );
35

PARAMS

37       target       QB_LOG_SYSLOG,    QB_LOG_STDERR     or     result     from
38       qb_log_file_open()
39
40       conf_type  configuration  directive  ("what to configure") that accepts
41       either int32_t or a null-terminated string argument determining the new
42       value  unless  ignored for particular directive (compatible directives:
43       those valid for qb_log_ctlQB_LOG_CONF_IDENT)
44
45       arg       the new value for a state-changing  configuration  directive,
46       ignored  otherwise; for QB_LOG_CONF_IDENT, 's' member as new identifier
47       to openlog(), for all qb_log_ctl-compatible ones, 'i32' member  is  as‐
48       sumed  (although  a  preferred way is to use that original function di‐
49       rectly as it allows for more type safety)
50

DESCRIPTION

STRUCTURES

53       struct qb_log_ctl2_arg_t {
54           int32_t       i32;
55           const char   *s;
56       };
57
58       enum qb_log_conf {
59             QB_LOG_CONF_ENABLED;
60             QB_LOG_CONF_FACILITY;
61             QB_LOG_CONF_DEBUG;
62             QB_LOG_CONF_SIZE;
63             QB_LOG_CONF_THREADED;
64             QB_LOG_CONF_PRIORITY_BUMP;
65             QB_LOG_CONF_STATE_GET;
66             QB_LOG_CONF_FILE_SYNC;
67             QB_LOG_CONF_EXTENDED;
68             QB_LOG_CONF_IDENT;
69             QB_LOG_CONF_MAX_LINE_LEN;
70             QB_LOG_CONF_ELLIPSIS;
71             QB_LOG_CONF_USE_JOURNAL;
72       };
73

NOTE

75       You can use QB_LOG_CTL2_I32 and QB_LOG_CTL2_S macros for  a  convenient
76       on-the-fly construction of the object to be passed as an arg argument.
77

SEE ALSO

79       qb_log_filter_fn_set(3), qb_log_from_external_source_va2(3),
80       qb_log_thread_start(3), qb_log_target_user_data_get(3),
81       qb_log_tags_stringify_fn_set(3), qb_log_file_reopen(3), qb_log_fini(3),
82       qb_log_callsites_dump(3), qb_log_target_user_data_set(3),
83       qb_log_target_format(3), qb_log_thread_priority_set(3),
84       qb_log_facility2int(3), qb_log_callsites_register(3),
85       qb_log_filter_ctl2(3), qb_log_file_close(3), qb_log_format_set(3),
86       qb_log_real_(3), qb_log_from_external_source_va(3),
87       qb_log_callsite_get(3), qb_log_blackbox_write_to_file(3),
88       qb_log_real_va_(3), qb_log_from_external_source(3),
89       qb_log_blackbox_print_from_file(3), qb_log_facility2str(3),
90       qb_log_callsite_get2(3), qb_log_ctl(3), qb_log_filter_ctl(3),
91       qb_log_custom_close(3), qb_log_init(3), qb_log_file_open(3),
92       qb_log_custom_open(3)
93
95       Copyright (c) 2017 Red Hat, Inc.
96
97
98
99LIBQB                             2023-07-21                    QB_LOG_CTL2(3)
Impressum