Age | Commit message (Collapse) | Author |
|
syntaxes
https://bugs.freedesktop.org/show_bug.cgi?id=60596
|
|
Makes it easier to watch just for new entries. Once scenario
is where the user starts 'journalctl -qfn0' to watch for changes
during some operation.
|
|
This makes journalctl quit on ferror() conditions on stdout. It fixes an
annoying bug if you pipe its output through 'less' and press 'q'. Without
this fix journalctl will continue reading all journal data until EOF which
can take quite some time. For instance on my machine:
david-nb ~ # time journalctl | wc -l
327240
real 1m13.039s
user 1m0.217s
sys 0m10.467s
However, expected behavior is journalctl to quit when its pager closed the
output pipe.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
|
|
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
|
|
Sometimes it is better to see messages in full, and the existing
set of options didn't allow this easily. E.g. now
journalctl -f --full
will behave like
tail -f /var/log/messages
of yore.
Long option only for now, since small letters are becoming
scarce, and this doesn't feel like a capital-letter-option.
'-u' would be nice, and the above command would be spelled
journalctl -fu
|
|
follow the rest of the file formats
|
|
The message catalog can be used to attach short help texts to log lines,
keyed by their MESSAGE_ID= fields. This is useful to help the
administrator understand the context and cause of a message, find
possible solutions and find further related documentation.
Since this is keyed off MESSAGE_ID= this will only work for native
journal messages.
The message catalog supports i18n, and is useful to augment english
language system messages with explanations in the local language.
This commit only includes short explanatory messages for a few example
message IDs, we'll add more complete documentation for the relevant
systemd messages later on.
|
|
This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list.
|
|
|
|
journalctl and vconsole-setup both implement utf8 locale detection.
Let's have a common function for it.
The next patch will add another use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example:
journalctl -F _SYSTEMD_UNIT
will list all units that ever logged to the journal.
|
|
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.
|
|
This applies unit_name_mangle() to the specified unit names and hence
can handle weird characters nicely and will add unit suffixes as
necessary.
|
|
From now on, always use ANSI-SQL-style comments in log streams, i.e.
prefix with --. We also suffix things with this, just to be nice...
|
|
|
|
|
|
Stopped working after cfbc22ab 'journalctl: implement --since= and
--until for filtering by time'.
|
|
|
|
text/event-stream
|
|
|
|
|
|
Among other cleanups this introduces a threshold for the size of binary
blobs we serialize as integer arrays in the JSON output. THis can be
disabled via --all.
|
|
|
|
|
|
The old code used a timestamp to print a timespan for unsealed journalfiles,
incorrectly showing things like 2230 days of unsealed entries. Print the timespan
between the first and last entry instead.
|
|
This requires a little bit of tip-toeing around to explicitly avoid
touching the environment from a sig handler. Instead, simply create a
function to reset the var to its "unset" state, allowing the next call
to columns() to recalculate and cache the new value.
|
|
|
|
|
|
|
|
|
|
journals by default
|
|
This splits the JSON output mode into different modes: json and
json-pretty. The former printing one entry per line, the latter showing
JSON objects nicely indented and in multiple lines to make it easier to
read for humans.
|
|
persistant logging is off
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This test goes through every single bit in a journal file, toggles it,
and checks if this change is detected by the verification.
|