X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=man%2Fsd_journal_add_match.xml;h=83f7fe9242d840df42a72ce586b07cf84dd72023;hb=5057d73ba1bb016c9325d0a7fdb84519d3443622;hp=fe89cbf75c59f6c4d6ce16ed063ce574514ea88e;hpb=ea3db0141889301964c6214e1d2423d32d570946;p=thirdparty%2Fsystemd.git diff --git a/man/sd_journal_add_match.xml b/man/sd_journal_add_match.xml index fe89cbf75c5..83f7fe9242d 100644 --- a/man/sd_journal_add_match.xml +++ b/man/sd_journal_add_match.xml @@ -1,43 +1,13 @@ - -%entities; -]> + + - - - + sd_journal_add_match systemd - - - - Developer - Lennart - Poettering - lennart@poettering.net - - @@ -91,11 +61,19 @@ sd_journal_next3 and sd_journal_get_data3. - Matches are of the form FIELD=value, where the - field part is a short uppercase string consisting only of 0-9, A-Z - and the underscore. It may not begin with two underscores or be - the empty string. The value part may be any value, including - binary. If a match is applied, only entries with this field set + Parameter data must be of the form + FIELD=value, + where the FIELD part is a short uppercase string consisting only + of 0–9, A–Z and the underscore; it may not begin with two underscores or be the empty + string. The value part may be anything, including binary. Parameter + size specifies the number of bytes in data + (i.e. the length of FIELD, plus one, plus the length of + value). Parameter size may also be + specified as 0, in which case data + must be a NUL-terminated string, and the bytes before the terminating + zero are used as the match. + + If a match is applied, only entries with this field set will be iterated. Multiple matches may be active at the same time: If they apply to different fields, only entries with both fields set like this will be iterated. If they apply to the same fields, @@ -160,18 +138,7 @@ returns nothing. - - Notes - - The sd_journal_add_match(), - sd_journal_add_disjunction(), - sd_journal_add_conjunction() and - sd_journal_flush_matches() - interfaces are available as a shared library, which can - be compiled and linked to with the - libsystemd pkg-config1 - file. - + Examples @@ -182,7 +149,7 @@ message ID 03bb1dab98ab4ecfbf6fff2738bdd964 coming from any service (this example lacks the necessary error checking): - ... + … int add_matches(sd_journal *j) { sd_journal_add_match(j, "_SYSTEMD_UNIT=avahi-daemon.service", 0); sd_journal_add_match(j, "PRIORITY=0", 0); @@ -192,7 +159,6 @@ int add_matches(sd_journal *j) { sd_journal_add_disjunction(j); sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0); } -