diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-10-18 03:29:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-10-18 03:35:18 +0200 |
commit | 3c1668da6202f1ead3d4d3981b89e9da1a0e98e3 (patch) | |
tree | d4e2785f1dac02c19797373bb4342354e1958e9d /src/journal/journal-file.h | |
parent | 86b2e20a5e5abf222fb81edcb5d58d012e35cbaa (diff) |
journal: add ability to list values a specified field can take in all entries of the journal
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".
Ultimately this allows implementation of tools similar to lastlog based
on journal data.
Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files.
Diffstat (limited to 'src/journal/journal-file.h')
-rw-r--r-- | src/journal/journal-file.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index f52ee8c538..d87cbe4876 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -155,6 +155,9 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st int journal_file_find_data_object(JournalFile *f, const void *data, uint64_t size, Object **ret, uint64_t *offset); int journal_file_find_data_object_with_hash(JournalFile *f, const void *data, uint64_t size, uint64_t hash, Object **ret, uint64_t *offset); +int journal_file_find_field_object(JournalFile *f, const void *field, uint64_t size, Object **ret, uint64_t *offset); +int journal_file_find_field_object_with_hash(JournalFile *f, const void *field, uint64_t size, uint64_t hash, Object **ret, uint64_t *offset); + int journal_file_next_entry(JournalFile *f, Object *o, uint64_t p, direction_t direction, Object **ret, uint64_t *offset); int journal_file_skip_entry(JournalFile *f, Object *o, uint64_t p, int64_t skip, Object **ret, uint64_t *offset); |