Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdjournal: Enumerate the fields #142

Closed
tv42 opened this issue Mar 2, 2016 · 3 comments
Closed

sdjournal: Enumerate the fields #142

tv42 opened this issue Mar 2, 2016 · 3 comments

Comments

@tv42
Copy link

tv42 commented Mar 2, 2016

Right now, sdjournal only lets you access fields you already know to expect. The C library has sd_journal_enumerate_data for accessing all fields of a single message, and sd_journal_enumerate_fields for listing all fields that all messages in the journal contain.

https://www.freedesktop.org/software/systemd/man/sd_journal_get_data.html
https://www.freedesktop.org/software/systemd/man/sd_journal_enumerate_fields.html

@jonboulle
Copy link
Contributor

Seems perfectly reasonable, feel free to submit a patch!

@lucab
Copy link
Contributor

lucab commented Jun 3, 2016

@tv42 #164 is being reviewed at the moment, and if I've understood correctly is should address your request. Care to chime in there to check that it fits your usecase?

@tv42
Copy link
Author

tv42 commented Jun 3, 2016

@lucab Seems like it would.

glerchundi added a commit to glerchundi/go-systemd that referenced this issue Jun 5, 2016
…elds

Implements the same semantics as the JOURNAL_FOREACH_DATA_RETVAL macro in journal-internal.h and produces a *JournalEntry with every field with its corresponding data in a map[string]string. Also it includes address fields like realtime (__REALTIME_TIMESTAMP), monotonic (__MONOTONIC_TIMESTAMP and cursor (__CURSOR).

It mimics more or less `journalctl -o json`.

Fixes coreos#142
Supersedes coreos#136
glerchundi added a commit to glerchundi/go-systemd that referenced this issue Jun 5, 2016
…elds

Implements the same semantics as the JOURNAL_FOREACH_DATA_RETVAL macro in journal-internal.h and produces a *JournalEntry with every field with its corresponding data in a map[string]string. Also it includes address fields like realtime (__REALTIME_TIMESTAMP), monotonic (__MONOTONIC_TIMESTAMP and cursor (__CURSOR).

It mimics more or less `journalctl -o json`.

Fixes coreos#142
Supersedes coreos#136
glerchundi added a commit to glerchundi/go-systemd that referenced this issue Jun 7, 2016
…elds

Implements the same semantics as the JOURNAL_FOREACH_DATA_RETVAL macro in journal-internal.h and produces a *JournalEntry with every field with its corresponding data in a map[string]string. Also it includes address fields like realtime (__REALTIME_TIMESTAMP), monotonic (__MONOTONIC_TIMESTAMP and cursor (__CURSOR).

It mimics more or less `journalctl -o json`.

Fixes coreos#142
Supersedes coreos#136
glerchundi added a commit to glerchundi/go-systemd that referenced this issue Jun 7, 2016
…elds

Implements the same semantics as the JOURNAL_FOREACH_DATA_RETVAL macro in journal-internal.h and produces a *JournalEntry with every field with its corresponding data in a map[string]string. Also it includes address fields like realtime (__REALTIME_TIMESTAMP), monotonic (__MONOTONIC_TIMESTAMP and cursor (__CURSOR).

It mimics more or less `journalctl -o json`.

Fixes coreos#142
Supersedes coreos#136
@lucab lucab closed this as completed in #164 Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants