[systemd-devel] order of sd_journal_query_unique()?

Daurnimator quae at daurnimator.com
Fri Mar 6 15:45:33 PST 2015


On 6 March 2015 at 16:13, Chris Morgan <chmorgan at gmail.com> wrote:
> So is SD_JOURNAL_FOREACH_BACKWARDS the fastest way to find the newest
> journal entry with a given field? journalctl seems a ton faster than
> my c application is when I search for a given field that is not
> present. And by search I'm doing:
>
> journalctl --user BLAH=1
>
> Chris

To find the newest journal entry:
  - sd_journal_seek_tail
  - sd_journal_add_match and similar to add criteria
  - sd_journal_previous


More information about the systemd-devel mailing list