From 3dc8396ba9e538b81998f54e28b818796b414a6b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Apr 2013 03:11:44 +0200 Subject: man: document the new sd_journal_add_conjunction() call --- man/sd_journal_add_match.xml | 66 ++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 17 deletions(-) (limited to 'man/sd_journal_add_match.xml') diff --git a/man/sd_journal_add_match.xml b/man/sd_journal_add_match.xml index 04b33883cb..549785ca83 100644 --- a/man/sd_journal_add_match.xml +++ b/man/sd_journal_add_match.xml @@ -45,6 +45,7 @@ sd_journal_add_match sd_journal_add_disjunction + sd_journal_add_conjunction sd_journal_flush_matches Add or remove entry matches @@ -65,6 +66,11 @@ sd_journal* j + + int sd_journal_add_conjunction + sd_journal* j + + void sd_journal_flush_matches sd_journal* j @@ -105,21 +111,45 @@ sd_journal_add_disjunction() may be used to insert a disjunction (i.e. logical OR) in the match list. If this call is invoked all - previously added matches are combined in an OR with - all matches added afterwards, until - sd_journal_add_disjunction() is - invoked again to begin the next OR term. The + previously added matches since the last invocation of + sd_journal_add_disjunction() or + sd_journal_add_conjunction() are + combined in an OR with all matches added afterwards, + until + sd_journal_add_disjunction() or + sd_journal_add_conjunction() is + invoked again to begin the next OR or AND + term. + + sd_journal_add_conjunction() + may be used to insert a conjunction (i.e. logical AND) + in the match list. If this call is invoked all + previously added matches since the last invocation of + sd_journal_add_conjunction() are + combined in an AND with all matches added afterwards, + until + sd_journal_add_conjunction() is + invoked again to begin the next AND term. The combination of - sd_journal_add_match() and - sd_journal_add_disjunction() may + sd_journal_add_match(), + sd_journal_add_disjunction() and + sd_journal_add_conjunction() may be used to build complex search terms, even though - full logical expressions are not available. + full logical expressions are not available. Note that + sd_journal_add_conjunction() + operates one level 'higher' than + sd_journal_add_disjunction(). It + is hence possible to build an expression of AND terms, + consisting of OR terms, consisting of AND terms, + consisting of OR terms of matches (the latter OR + expression is implicitly created for matches with the + same field name, see above). sd_journal_flush_matches() - may be used to flush all matches and disjunction terms - again. After this call all filtering is removed and - all entries in the journal will be iterated - again. + may be used to flush all matches, disjunction and + conjunction terms again. After this call all filtering + is removed and all entries in the journal will be + iterated again. Note that filtering via matches only applies to the way the journal is read, it has no effect on storage @@ -129,8 +159,9 @@ Return Value - sd_journal_add_match() and - sd_journal_add_disjunction() + sd_journal_add_match(), + sd_journal_add_disjunction() and + sd_journal_add_conjunction() return 0 on success or a negative errno-style error code. sd_journal_flush_matches() returns nothing. @@ -140,10 +171,11 @@ Notes The sd_journal_add_match(), - sd_journal_add_disjunction() and - sd_journal_flush_matches() interfaces are - available as shared library, which can be compiled and - linked to with the + sd_journal_add_disjunction(), + sd_journal_add_conjunction() and + sd_journal_flush_matches() + interfaces are available as shared library, which can + be compiled and linked to with the libsystemd-journal pkg-config1 file. -- cgit v1.2.3-54-g00ecf