mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
Merge pull request #6677 from yuwata/man-journal-remote
journal-remote: improve man page and error message
This commit is contained in:
commit
b1a05d7320
@ -106,6 +106,8 @@
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><arg choice="opt" rep="repeat">SOURCES</arg></term>
|
||||
|
||||
<listitem><para>When <option>-</option> is given as a
|
||||
positional argument, events will be read from standard input.
|
||||
Other positional arguments will be treated as filenames
|
||||
@ -124,6 +126,20 @@
|
||||
instance, e.g. http://some.host:19531/ or
|
||||
https://some.host:19531/.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--getter='<replaceable>PROG</replaceable> <arg choice="opt" rep="repeat">OPTIONS</arg>'</option></term>
|
||||
|
||||
<listitem><para>Program to invoke to retrieve data. The journal
|
||||
event stream must be generated on standard output.</para>
|
||||
|
||||
<para>Examples:</para>
|
||||
|
||||
<programlisting>--getter='curl "-HAccept: application/vnd.fdo.journal" https://some.host:19531/'</programlisting>
|
||||
|
||||
<programlisting>--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</programlisting>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>Passive sources can be specified in the following
|
||||
@ -225,8 +241,9 @@
|
||||
escaped hostname of the source endpoint of the connection, or the
|
||||
numerical address if the hostname cannot be determined.</para>
|
||||
|
||||
<para>In case of "active" sources, the output file name must
|
||||
always be given explicitly.</para>
|
||||
<para>In the case that "active" sources are given by the positional
|
||||
arguments or <option>--getter=</option> option, the output file name
|
||||
must always be given explicitly.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
@ -265,20 +282,6 @@
|
||||
The default is <literal>no</literal>.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--getter=<replaceable>PROG --option1 --option2</replaceable></option></term>
|
||||
|
||||
<listitem><para>Program to invoke to retrieve data. The journal
|
||||
event stream must be generated on standard output.</para>
|
||||
|
||||
<para>Examples:</para>
|
||||
|
||||
<programlisting>--getter='curl "-HAccept: application/vnd.fdo.journal" https://some.host:19531/'</programlisting>
|
||||
|
||||
<programlisting>--getter='wget --header="Accept: application/vnd.fdo.journal" -O- https://some.host:19531/'</programlisting>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<xi:include href="standard-options.xml" xpointer="help" />
|
||||
<xi:include href="standard-options.xml" xpointer="version" />
|
||||
</variablelist>
|
||||
@ -288,7 +291,7 @@
|
||||
<title>Examples</title>
|
||||
<para>Copy local journal events to a different journal directory:
|
||||
<programlisting>
|
||||
journalctl -o export | systemd-journal-remote -o /tmp/dir -
|
||||
journalctl -o export | systemd-journal-remote -o /tmp/dir/foo.journal -
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
|
@ -1495,10 +1495,15 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
arg_split_mode = JOURNAL_WRITE_SPLIT_NONE;
|
||||
}
|
||||
|
||||
if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE
|
||||
&& arg_output && is_dir(arg_output, true) > 0) {
|
||||
log_error("For SplitMode=none, output must be a file.");
|
||||
return -EINVAL;
|
||||
if (arg_split_mode == JOURNAL_WRITE_SPLIT_NONE && arg_output) {
|
||||
if (is_dir(arg_output, true) > 0) {
|
||||
log_error("For SplitMode=none, output must be a file.");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!endswith(arg_output, ".journal")) {
|
||||
log_error("For SplitMode=none, output file name must end with .journal.");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (arg_split_mode == JOURNAL_WRITE_SPLIT_HOST
|
||||
|
Loading…
Reference in New Issue
Block a user