journalctl: allow globbing in --unit and --user-unit

This is a continuation of e3e0314b systemctl: allow globbing in commands
which take multiple unit names.

Multiple patterns can be specified, as separate arguments, or as one argument
with patterns seperated by commas.

If patterns are given, at least one unit must be matched (by any of the patterns).
This is different behaviour than systemctl, but here it is necessary because
otherwise anything would be matched, which is unlikely to be the intended
behaviour.

https://bugs.freedesktop.org/show_bug.cgi?id=59336
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2014-01-11 10:07:22 -05:00
parent ae97089d49
commit ea18a4b57e
2 changed files with 185 additions and 30 deletions
+19 -9
View File
@@ -509,17 +509,27 @@
<varlistentry>
<term><option>-u</option></term>
<term><option>--unit=</option></term>
<term><option>--unit=<replaceable>UNIT</replaceable>|<replaceable>PATTERN</replaceable></option></term>
<listitem><para>Show messages for the
specified systemd unit. This will add
a match for messages from the unit
(<literal>_SYSTEMD_UNIT=</literal>)
and additional matches for messages
from systemd and messages about
coredumps for the specified unit.</para>
<para>This parameter can be specified multiple times.
</para></listitem>
specified systemd unit
<replaceable>UNIT</replaceable>, or
for any of the units matched by
<replaceable>PATTERN</replaceable>.
If a pattern is specified, a list of
unit names found in the journal is
compared with the specified pattern
and all that match are used. For each
unit name a match is added for
messages from the unit
(<literal>_SYSTEMD_UNIT=<replaceable>UNIT</replaceable></literal>)
along with additional matches for
messages from systemd and messages
about coredumps for the specified
unit.</para>
<para>This parameter can be specified
multiple times. </para></listitem>
</varlistentry>
<varlistentry>