1
0
mirror of https://github.com/systemd/systemd.git synced 2025-09-19 01:44:42 +03:00

journalctl: imply -n1000 when -e is used

Make sure the pager does not have to buffer an unbounded number of log
messages, by default.
This commit is contained in:
Lennart Poettering
2013-03-07 21:49:12 +01:00
parent 2e4015f3e7
commit fe59e38bef
2 changed files with 12 additions and 4 deletions

View File

@@ -168,10 +168,14 @@
<listitem><para>Immediately jump to <listitem><para>Immediately jump to
the end of the journal inside the the end of the journal inside the
implied pager tool. Very useful in implied pager tool. This implies
combination with the <option>-n1000</option> to guarantee
<option>-b</option> option. Note that that the pager won't buffer logs of
this is only supported for the unbounded size. This may be overriden
with an explicit <option>-n</option>
with some other numeric value on the
command line. Note that this option is
only supported for the
<citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
pager.</para></listitem> pager.</para></listitem>
</varlistentry> </varlistentry>

View File

@@ -221,6 +221,10 @@ static int parse_argv(int argc, char *argv[]) {
case 'e': case 'e':
arg_pager_end = true; arg_pager_end = true;
if (arg_lines < 0)
arg_lines = 1000;
break; break;
case 'f': case 'f':