~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/sd_journal_add_match.xml

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        <refnamediv>
46
46
                <refname>sd_journal_add_match</refname>
47
47
                <refname>sd_journal_add_disjunction</refname>
 
48
                <refname>sd_journal_add_conjunction</refname>
48
49
                <refname>sd_journal_flush_matches</refname>
49
50
                <refpurpose>Add or remove entry matches</refpurpose>
50
51
        </refnamediv>
66
67
                        </funcprototype>
67
68
 
68
69
                        <funcprototype>
 
70
                                <funcdef>int <function>sd_journal_add_conjunction</function></funcdef>
 
71
                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
 
72
                        </funcprototype>
 
73
 
 
74
                        <funcprototype>
69
75
                                <funcdef>void <function>sd_journal_flush_matches</function></funcdef>
70
76
                                <paramdef>sd_journal* <parameter>j</parameter></paramdef>
71
77
                        </funcprototype>
105
111
                <para><function>sd_journal_add_disjunction()</function>
106
112
                may be used to insert a disjunction (i.e. logical OR)
107
113
                in the match list. If this call is invoked all
108
 
                previously added matches are combined in an OR with
109
 
                all matches added afterwards, until
110
 
                <function>sd_journal_add_disjunction()</function> is
111
 
                invoked again to begin the next OR term. The
 
114
                previously added matches since the last invocation of
 
115
                <function>sd_journal_add_disjunction()</function> or
 
116
                <function>sd_journal_add_conjunction()</function> are
 
117
                combined in an OR with all matches added afterwards,
 
118
                until
 
119
                <function>sd_journal_add_disjunction()</function> or
 
120
                <function>sd_journal_add_conjunction()</function> is
 
121
                invoked again to begin the next OR or AND
 
122
                term. </para>
 
123
 
 
124
                <para><function>sd_journal_add_conjunction()</function>
 
125
                may be used to insert a conjunction (i.e. logical AND)
 
126
                in the match list. If this call is invoked all
 
127
                previously added matches since the last invocation of
 
128
                <function>sd_journal_add_conjunction()</function> are
 
129
                combined in an AND with all matches added afterwards,
 
130
                until
 
131
                <function>sd_journal_add_conjunction()</function> is
 
132
                invoked again to begin the next AND term. The
112
133
                combination of
113
 
                <function>sd_journal_add_match()</function> and
114
 
                <function>sd_journal_add_disjunction()</function> may
 
134
                <function>sd_journal_add_match()</function>,
 
135
                <function>sd_journal_add_disjunction()</function> and
 
136
                <function>sd_journal_add_conjunction()</function> may
115
137
                be used to build complex search terms, even though
116
 
                full logical expressions are not available.</para>
 
138
                full logical expressions are not available. Note that
 
139
                <function>sd_journal_add_conjunction()</function>
 
140
                operates one level 'higher' than
 
141
                <function>sd_journal_add_disjunction()</function>. It
 
142
                is hence possible to build an expression of AND terms,
 
143
                consisting of OR terms, consisting of AND terms,
 
144
                consisting of OR terms of matches (the latter OR
 
145
                expression is implicitly created for matches with the
 
146
                same field name, see above).</para>
117
147
 
118
148
                <para><function>sd_journal_flush_matches()</function>
119
 
                may be used to flush all matches and disjunction terms
120
 
                again. After this call all filtering is removed and
121
 
                all entries in the journal will be iterated
122
 
                again.</para>
 
149
                may be used to flush all matches, disjunction and
 
150
                conjunction terms again. After this call all filtering
 
151
                is removed and all entries in the journal will be
 
152
                iterated again.</para>
123
153
 
124
154
                <para>Note that filtering via matches only applies to
125
155
                the way the journal is read, it has no effect on storage
129
159
        <refsect1>
130
160
                <title>Return Value</title>
131
161
 
132
 
                <para><function>sd_journal_add_match()</function> and
133
 
                <function>sd_journal_add_disjunction()</function>
 
162
                <para><function>sd_journal_add_match()</function>,
 
163
                <function>sd_journal_add_disjunction()</function> and
 
164
                <function>sd_journal_add_conjunction()</function>
134
165
                return 0 on success or a negative errno-style error
135
166
                code. <function>sd_journal_flush_matches()</function>
136
167
                returns nothing.</para>
140
171
                <title>Notes</title>
141
172
 
142
173
                <para>The <function>sd_journal_add_match()</function>,
143
 
                <function>sd_journal_add_disjunction()</function> and
144
 
                <function>sd_journal_flush_matches()</function> interfaces are
145
 
                available as shared library, which can be compiled and
146
 
                linked to with the
 
174
                <function>sd_journal_add_disjunction()</function>,
 
175
                <function>sd_journal_add_conjunction()</function> and
 
176
                <function>sd_journal_flush_matches()</function>
 
177
                interfaces are available as shared library, which can
 
178
                be compiled and linked to with the
147
179
                <literal>libsystemd-journal</literal>
148
180
                <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
149
181
                file.</para>