Document the need to do journalctl --flush for persistent logging (#19481)

Document the need to do journalctl --flush for persistent logging. (fixes #19480)

Co-authored-by: Luca Lindhorst <l.lindhorst@wut.de>
This commit is contained in:
Luca Adrian L 2021-05-03 17:08:25 +02:00 committed by GitHub
parent d4d7127d94
commit 19d25fdec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -78,6 +78,11 @@
the kernel log buffer, or a syslog socket will still work). Defaults to <literal>auto</literal> in
the default journal namespace, and <literal>persistent</literal> in all others.</para>
<para>Note that journald will initially use volatile storage, until a call to
<command>journalctl --flush</command> (or sending <constant>SIGUSR1</constant> to journald) will cause
it to switch to persistent logging (under the conditions mentioned above). This is done automatically
on boot via <literal>systemd-journal-flush.service</literal>.</para>
<para>Note that when this option is changed to <literal>volatile</literal>, existing persistent data
is not removed. In the other direction,
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> with

View file

@ -80,6 +80,11 @@
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> to configure
where log data is placed, independently of the existence of <filename>/var/log/journal/</filename>.</para>
<para>Note that journald will initially use volatile storage, until a call to
<command>journalctl --flush</command> (or sending <constant>SIGUSR1</constant> to journald) will cause
it to switch to persistent logging (under the conditions mentioned above). This is done automatically
on boot via <literal>systemd-journal-flush.service</literal>.</para>
<para>On systems where <filename>/var/log/journal/</filename> does not exist yet but where persistent logging is
desired (and the default <filename>journald.conf</filename> is used), it is sufficient to create the directory, and
ensure it has the correct access modes and ownership:</para>