]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/journald.conf.xml
1b07040da49e9d1eda929739ce26c7751d5978fa
[thirdparty/systemd.git] / man / journald.conf.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="journald.conf"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>journald.conf</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>journald.conf</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>journald.conf</refname>
20 <refname>journald.conf.d</refname>
21 <refname>journald@.conf</refname>
22 <refpurpose>Journal service configuration files</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <para><simplelist>
27 <member><filename>/etc/systemd/journald.conf</filename></member>
28 <member><filename>/run/systemd/journald.conf</filename></member>
29 <member><filename>/usr/lib/systemd/journald.conf</filename></member>
30 <member><filename>/etc/systemd/journald.conf.d/*.conf</filename></member>
31 <member><filename>/run/systemd/journald.conf.d/*.conf</filename></member>
32 <member><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></member>
33 <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename></member>
34 <member><filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
35 <member><filename>/run/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
36 <member><filename>/usr/lib/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf.d/*.conf</filename></member>
37 </simplelist></para>
38 </refsynopsisdiv>
39
40 <refsect1>
41 <title>Description</title>
42
43 <para>These files configure various parameters of the systemd journal service,
44 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
45 See
46 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
47 for a general description of the syntax.</para>
48
49 <para>The <command>systemd-journald</command> instance managing the default namespace is configured by
50 <filename>/etc/systemd/journald.conf</filename> and associated drop-ins. Instances managing other
51 namespaces read <filename>/etc/systemd/journald@<replaceable>NAMESPACE</replaceable>.conf</filename>
52 and associated drop-ins with the namespace identifier filled in. This allows each namespace to carry
53 a distinct configuration. See
54 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
55 for details about journal namespaces.</para>
56 </refsect1>
57
58 <xi:include href="standard-conf.xml" xpointer="main-conf" />
59
60 <refsect1>
61 <title>Options</title>
62
63 <para>All options are configured in the
64 [Journal] section:</para>
65
66 <variablelist class='config-directives'>
67
68 <varlistentry>
69 <term><varname>Storage=</varname></term>
70
71 <listitem><para>Controls where to store journal data. One of <literal>volatile</literal>,
72 <literal>persistent</literal>, <literal>auto</literal> and <literal>none</literal>. If
73 <literal>volatile</literal>, journal log data will be stored only in memory, i.e. below the
74 <filename>/run/log/journal</filename> hierarchy (which is created if needed). If
75 <literal>persistent</literal>, data will be stored preferably on disk, i.e. below the
76 <filename>/var/log/journal</filename> hierarchy (which is created if needed), with a fallback to
77 <filename>/run/log/journal</filename> (which is created if needed), during early boot and if the disk
78 is not writable. <literal>auto</literal> behaves like <literal>persistent</literal> if the
79 <filename>/var/log/journal</filename> directory exists, and <literal>volatile</literal> otherwise
80 (the existence of the directory controls the storage mode). <literal>none</literal> turns off all
81 storage, all log data received will be dropped (but forwarding to other targets, such as the console,
82 the kernel log buffer, or a syslog socket will still work). Defaults to <literal>auto</literal> in
83 the default journal namespace, and <literal>persistent</literal> in all others.</para>
84
85 <para>Note that journald will initially use volatile storage, until a call to
86 <command>journalctl --flush</command> (or sending <constant>SIGUSR1</constant> to journald) will cause
87 it to switch to persistent logging (under the conditions mentioned above). This is done automatically
88 on boot via <literal>systemd-journal-flush.service</literal>.</para>
89
90 <para>Note that when this option is changed to <literal>volatile</literal>, existing persistent data
91 is not removed. In the other direction,
92 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> with
93 the <option>--flush</option> option may be used to move volatile data to persistent storage.</para>
94
95 <para>When journal namespacing (see <varname>LogNamespace=</varname> in
96 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>) is
97 used, setting <varname>Storage=</varname> to <literal>volatile</literal> or <literal>auto</literal>
98 will not have an effect on the creation of the per-namespace logs directory in
99 <filename>/var/log/journal/</filename>, as the <filename>systemd-journald@.service</filename> service
100 file by default carries <varname>LogsDirectory=</varname>. To turn that off, add a unit file drop-in
101 file that sets <varname>LogsDirectory=</varname> to an empty string.</para>
102
103 <para>Note that per-user journal files are not supported unless persistent storage is enabled, thus
104 making <command>journalctl --user</command> unavailable.</para>
105
106 <xi:include href="version-info.xml" xpointer="v186"/>
107 </listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term><varname>Compress=</varname></term>
112
113 <listitem><para>Can take a boolean value. If enabled (the
114 default), data objects that shall be stored in the journal
115 and are larger than the default threshold of 512 bytes are
116 compressed before they are written to the file system. It
117 can also be set to a number of bytes to specify the
118 compression threshold directly. Suffixes like K, M, and G
119 can be used to specify larger units.</para></listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><varname>Seal=</varname></term>
124
125 <listitem><para>Takes a boolean value. If enabled (the
126 default), and a sealing key is available (as created by
127 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
128 <option>--setup-keys</option> command), Forward Secure Sealing
129 (FSS) for all persistent journal files is enabled. FSS is
130 based on <ulink
131 url="https://eprint.iacr.org/2013/397">Seekable Sequential Key
132 Generators</ulink> by G. A. Marson and B. Poettering
133 (doi:10.1007/978-3-642-40203-6_7) and may be used to protect
134 journal files from unnoticed alteration.</para>
135
136 <xi:include href="version-info.xml" xpointer="v189"/></listitem>
137 </varlistentry>
138
139 <varlistentry>
140 <term><varname>SplitMode=</varname></term>
141
142 <listitem><para>Controls whether to split up journal files per user, either <literal>uid</literal> or
143 <literal>none</literal>. Split journal files are primarily useful for access control: on UNIX/Linux access
144 control is managed per file, and the journal daemon will assign users read access to their journal files. If
145 <literal>uid</literal>, all regular users (with UID outside the range of system users, dynamic service users,
146 and the nobody user) will each get their own journal files, and system users will log to the system journal.
147 See <ulink url="https://systemd.io/UIDS-GIDS">Users, Groups, UIDs and GIDs on systemd systems</ulink>
148 for more details about UID ranges.
149 If <literal>none</literal>, journal files are not split up by user and all messages are
150 instead stored in the single system journal. In this mode unprivileged users generally do not have access to
151 their own log data. Note that splitting up journal files by user is only available for journals stored
152 persistently. If journals are stored on volatile storage (see <varname>Storage=</varname> above), only a single
153 journal file is used. Defaults to <literal>uid</literal>.</para>
154
155 <xi:include href="version-info.xml" xpointer="v190"/></listitem>
156 </varlistentry>
157
158 <varlistentry>
159 <term><varname>RateLimitIntervalSec=</varname></term>
160 <term><varname>RateLimitBurst=</varname></term>
161
162 <listitem><para>Configures the rate limiting that is applied
163 to all messages generated on the system. If, in the time
164 interval defined by <varname>RateLimitIntervalSec=</varname>,
165 more messages than specified in
166 <varname>RateLimitBurst=</varname> are logged by a service,
167 all further messages within the interval are dropped until the
168 interval is over. A message about the number of dropped
169 messages is generated. This rate limiting is applied
170 per-service, so that two services which log do not interfere
171 with each other's limits. Defaults to 10000 messages in 30s.
172 The time specification for
173 <varname>RateLimitIntervalSec=</varname> may be specified in the
174 following units: <literal>s</literal>, <literal>min</literal>,
175 <literal>h</literal>, <literal>ms</literal>,
176 <literal>us</literal>. To turn off any kind of rate limiting,
177 set either value to 0.</para>
178
179 <para>Note that the effective rate limit is multiplied by a
180 factor derived from the available free disk space for the journal.
181 Currently, this factor is calculated using the base 2 logarithm.</para>
182
183 <table>
184 <title>Example <varname>RateLimitBurst=</varname> rate
185 modifications by the available disk space</title>
186 <tgroup cols='2'>
187 <colspec colname='freespace' />
188 <colspec colname='multiplier' />
189 <thead>
190 <row>
191 <entry>Available Disk Space</entry>
192 <entry>Burst Multiplier</entry>
193 </row>
194 </thead>
195 <tbody>
196 <row>
197 <entry>&lt;= 1MB</entry>
198 <entry>1</entry>
199 </row>
200 <row>
201 <entry>&lt;= 16MB</entry>
202 <entry>2</entry>
203 </row>
204 <row>
205 <entry>&lt;= 256MB</entry>
206 <entry>3</entry>
207 </row>
208 <row>
209 <entry>&lt;= 4GB</entry>
210 <entry>4</entry>
211 </row>
212 <row>
213 <entry>&lt;= 64GB</entry>
214 <entry>5</entry>
215 </row>
216 <row>
217 <entry>&lt;= 1TB</entry>
218 <entry>6</entry>
219 </row>
220 </tbody>
221 </tgroup>
222 </table>
223
224 <para>If a service provides rate limits for itself through
225 <varname>LogRateLimitIntervalSec=</varname> and/or <varname>LogRateLimitBurst=</varname>
226 in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
227 those values will override the settings specified here.</para>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry>
232 <term><varname>SystemMaxUse=</varname></term>
233 <term><varname>SystemKeepFree=</varname></term>
234 <term><varname>SystemMaxFileSize=</varname></term>
235 <term><varname>SystemMaxFiles=</varname></term>
236 <term><varname>RuntimeMaxUse=</varname></term>
237 <term><varname>RuntimeKeepFree=</varname></term>
238 <term><varname>RuntimeMaxFileSize=</varname></term>
239 <term><varname>RuntimeMaxFiles=</varname></term>
240
241 <listitem><para>Enforce size limits on the journal files
242 stored. The options prefixed with <literal>System</literal>
243 apply to the journal files when stored on a persistent file
244 system, more specifically
245 <filename>/var/log/journal</filename>. The options prefixed
246 with <literal>Runtime</literal> apply to the journal files
247 when stored on a volatile in-memory file system, more
248 specifically <filename>/run/log/journal</filename>. The former
249 is used only when <filename>/var/</filename> is mounted,
250 writable, and the directory
251 <filename>/var/log/journal</filename> exists. Otherwise, only
252 the latter applies. Note that this means that during early
253 boot and if the administrator disabled persistent logging,
254 only the latter options apply, while the former apply if
255 persistent logging is enabled and the system is fully booted
256 up. <command>journalctl</command> and
257 <command>systemd-journald</command> ignore all files with
258 names not ending with <literal>.journal</literal> or
259 <literal>.journal~</literal>, so only such files, located in
260 the appropriate directories, are taken into account when
261 calculating current disk usage.</para>
262
263 <para><varname>SystemMaxUse=</varname> and
264 <varname>RuntimeMaxUse=</varname> control how much disk space
265 the journal may use up at most.
266 <varname>SystemKeepFree=</varname> and
267 <varname>RuntimeKeepFree=</varname> control how much disk
268 space systemd-journald shall leave free for other uses.
269 <command>systemd-journald</command> will respect both limits
270 and use the smaller of the two values.</para>
271
272 <para>The first pair defaults to 10% and the second to 15% of
273 the size of the respective file system, but each value is
274 capped to 4G. If the file system is nearly full and either
275 <varname>SystemKeepFree=</varname> or
276 <varname>RuntimeKeepFree=</varname> are violated when
277 systemd-journald is started, the limit will be raised to the
278 percentage that is actually free. This means that if there was
279 enough free space before and journal files were created, and
280 subsequently something else causes the file system to fill up,
281 journald will stop using more space, but it will not be
282 removing existing files to reduce the footprint again,
283 either. Also note that only archived files are deleted to reduce the
284 space occupied by journal files. This means that, in effect, there might
285 still be more space used than <varname>SystemMaxUse=</varname> or
286 <varname>RuntimeMaxUse=</varname> limit after a vacuuming operation is
287 complete.</para>
288
289 <para><varname>SystemMaxFileSize=</varname> and <varname>RuntimeMaxFileSize=</varname> control how
290 large individual journal files may grow at most. This influences the granularity in which disk space
291 is made available through rotation, i.e. deletion of historic data. Defaults to one eighth of the
292 values configured with <varname>SystemMaxUse=</varname> and <varname>RuntimeMaxUse=</varname> capped
293 to 128M, so that usually seven rotated journal files are kept as history. If the journal compact
294 mode is enabled (enabled by default), the maximum file size is capped to 4G.</para>
295
296 <para>Specify values in bytes or use K, M, G, T, P, E as units for the specified sizes (equal to
297 1024, 1024², … bytes). Note that size limits are enforced synchronously when journal files are
298 extended, and no explicit rotation step triggered by time is needed.</para>
299
300 <para><varname>SystemMaxFiles=</varname> and
301 <varname>RuntimeMaxFiles=</varname> control how many
302 individual journal files to keep at most. Note that only
303 archived files are deleted to reduce the number of files until
304 this limit is reached; active files will stay around. This
305 means that, in effect, there might still be more journal files
306 around in total than this limit after a vacuuming operation is
307 complete. This setting defaults to 100.</para></listitem>
308 </varlistentry>
309
310 <varlistentry>
311 <term><varname>MaxFileSec=</varname></term>
312
313 <listitem><para>The maximum time to store entries in a single
314 journal file before rotating to the next one. Normally,
315 time-based rotation should not be required as size-based
316 rotation with options such as
317 <varname>SystemMaxFileSize=</varname> should be sufficient to
318 ensure that journal files do not grow without bounds. However,
319 to ensure that not too much data is lost at once when old
320 journal files are deleted, it might make sense to change this
321 value from the default of one month. Set to 0 to turn off this
322 feature. This setting takes time values which may be suffixed
323 with the units <literal>year</literal>,
324 <literal>month</literal>, <literal>week</literal>,
325 <literal>day</literal>, <literal>h</literal> or
326 <literal>m</literal> to override the default time unit of
327 seconds.</para>
328
329 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
330 </varlistentry>
331
332 <varlistentry>
333 <term><varname>MaxRetentionSec=</varname></term>
334
335 <listitem><para>The maximum time to store journal entries.
336 This controls whether journal files containing entries older
337 than the specified time span are deleted. Normally, time-based
338 deletion of old journal files should not be required as
339 size-based deletion with options such as
340 <varname>SystemMaxUse=</varname> should be sufficient to
341 ensure that journal files do not grow without bounds. However,
342 to enforce data retention policies, it might make sense to
343 change this value from the default of 0 (which turns off this
344 feature). This setting also takes time values which may be
345 suffixed with the units <literal>year</literal>,
346 <literal>month</literal>, <literal>week</literal>,
347 <literal>day</literal>, <literal>h</literal> or <literal>
348 m</literal> to override the default time unit of
349 seconds.</para>
350
351 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
352 </varlistentry>
353
354 <varlistentry>
355 <term><varname>SyncIntervalSec=</varname></term>
356
357 <listitem><para>The timeout before synchronizing journal files
358 to disk. After syncing, journal files are placed in the
359 OFFLINE state. Note that syncing is unconditionally done
360 immediately after a log message of priority CRIT, ALERT or
361 EMERG has been logged. This setting hence applies only to
362 messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The
363 default timeout is 5 minutes. </para>
364
365 <xi:include href="version-info.xml" xpointer="v199"/></listitem>
366 </varlistentry>
367
368 <varlistentry>
369 <term><varname>ForwardToSyslog=</varname></term>
370 <term><varname>ForwardToKMsg=</varname></term>
371 <term><varname>ForwardToConsole=</varname></term>
372 <term><varname>ForwardToWall=</varname></term>
373 <term><varname>ForwardToSocket=</varname></term>
374
375 <listitem><para>Control whether log messages received by the journal daemon shall be forwarded to a
376 traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, sent as wall
377 messages to all logged-in users or sent over a socket. These options take boolean arguments except
378 for <literal>ForwardToSocket=</literal> which takes an address instead. If forwarding
379 to syslog is enabled but nothing reads messages from the socket, forwarding to syslog has no effect. By default,
380 only forwarding to wall is enabled. These settings may be overridden at boot time with the kernel
381 command line options <literal>systemd.journald.forward_to_syslog</literal>,
382 <literal>systemd.journald.forward_to_kmsg</literal>,
383 <literal>systemd.journald.forward_to_console</literal>, and
384 <literal>systemd.journald.forward_to_wall</literal>. If the option name is specified without
385 <literal>=</literal> and the following argument, true is assumed. Otherwise, the argument is parsed
386 as a boolean.</para>
387
388 <para>The socket forwarding address can be specified with the credential
389 <literal>journal.forward_to_socket</literal>. The following socket types are supported:</para>
390
391 <para><simplelist type="inline">
392 <member><constant>AF_INET</constant> (e.g. <literal>192.168.0.11:4444</literal>)</member>
393 <member><constant>AF_INET6</constant> (e.g. <literal>[2001:db8::ff00:42:8329]:4444</literal>)</member>
394 <member><constant>AF_UNIX</constant> (e.g. <literal>/run/host/journal/socket</literal>)</member>
395 <member><constant>AF_VSOCK</constant> (e.g. <literal>vsock:2:1234</literal>)</member>
396 </simplelist></para>
397
398 <para>When forwarding to the console, the TTY to log to can be changed with
399 <varname>TTYPath=</varname>, described below.</para>
400
401 <para>When forwarding to the kernel log buffer (kmsg), make sure to select a suitably large size for
402 the log buffer, for example by adding <literal>log_buf_len=8M</literal> to the kernel command line.
403 <command>systemd</command> will automatically disable kernel's rate-limiting applied to userspace
404 processes (equivalent to setting <literal>printk.devkmsg=on</literal>).</para>
405
406 <para>When forwarding over a socket the <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS/#journal-export-format">
407 Journal Export Format</ulink> is used when sending over the wire. Notably this includes the metadata
408 field <varname>__REALTIME_TIMESTAMP</varname> so that
409 <command>systemd-journal-remote</command> (see
410 <citerefentry><refentrytitle>systemd-journal-remote.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
411 can be used to receive the forwarded journal entries.</para>
412
413 <para>Note: Forwarding is performed synchronously within journald, and may significantly affect its
414 performance. This is particularly relevant when using ForwardToConsole=yes in cloud environments,
415 where the console is often a slow, virtual serial port.
416 Since journald is implemented as a conventional single-process daemon, forwarding to a completely
417 hung console will block journald. This can have a cascading effect resulting in any services synchronously
418 logging to the blocked journal also becoming blocked. Unless actively debugging/developing something, it's
419 generally preferable to setup a <command>journalctl --follow</command> style service redirected to the
420 console, instead of ForwardToConsole=yes, for production use.</para>
421 </listitem>
422
423 <para>Note: Using <varname>ForwardToSocket=</varname> over IPv4/IPv6 links can be very slow due to the synchronous nature of the sockets.
424 Take care to ensure your link is a low-latency local link if possible. Typically IP networking is not available everywhere
425 journald runs, e.g. in the initrd during boot. Consider using <constant>AF_VSOCK</constant>/<constant>AF_UNIX</constant> sockets for this if possible.
426 </para>
427 </varlistentry>
428
429 <varlistentry>
430 <term><varname>MaxLevelStore=</varname></term>
431 <term><varname>MaxLevelSyslog=</varname></term>
432 <term><varname>MaxLevelKMsg=</varname></term>
433 <term><varname>MaxLevelConsole=</varname></term>
434 <term><varname>MaxLevelWall=</varname></term>
435 <term><varname>MaxLevelSocket=</varname></term>
436
437 <listitem><para>Controls the maximum log level of messages that are stored in the journal, forwarded
438 to syslog, kmsg, the console, the wall, or a socket (if that is enabled, see above). As argument,
439 takes one of <literal>emerg</literal>, <literal>alert</literal>, <literal>crit</literal>,
440 <literal>err</literal>, <literal>warning</literal>, <literal>notice</literal>,
441 <literal>info</literal>, <literal>debug</literal>, or integer values in the range of 07
442 (corresponding to the same levels). Messages equal or below the log level specified are
443 stored/forwarded, messages above are dropped. Defaults to <literal>debug</literal> for
444 <varname>MaxLevelStore=</varname>, <varname>MaxLevelSyslog=</varname> and
445 <varname>MaxLevelSocket=</varname>, to ensure that the all messages are stored in the journal,
446 forwarded to syslog and the socket if one exists. Defaults to <literal>notice</literal> for
447 <varname>MaxLevelKMsg=</varname>, <literal>info</literal> for <varname>MaxLevelConsole=</varname>,
448 and <literal>emerg</literal> for <varname>MaxLevelWall=</varname>. These settings may be overridden
449 at boot time with the kernel command line options
450 <literal>systemd.journald.max_level_store=</literal>,
451 <literal>systemd.journald.max_level_syslog=</literal>,
452 <literal>systemd.journald.max_level_kmsg=</literal>,
453 <literal>systemd.journald.max_level_console=</literal>,
454 <literal>systemd.journald.max_level_wall=</literal>,
455 <literal>systemd.journald.max_level_socket=</literal>.</para>
456
457 <xi:include href="version-info.xml" xpointer="v185"/>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry>
462 <term><varname>ReadKMsg=</varname></term>
463
464 <listitem><para>Takes a boolean value. If enabled <command>systemd-journal</command> processes
465 <filename>/dev/kmsg</filename> messages generated by the kernel. In the default journal namespace
466 this option is enabled by default, it is disabled in all others.</para>
467
468 <xi:include href="version-info.xml" xpointer="v235"/></listitem>
469 </varlistentry>
470
471 <varlistentry>
472 <term><varname>Audit=</varname></term>
473
474 <listitem><para>Takes a boolean value. If enabled <command>systemd-journald</command> will turn on
475 kernel auditing on start-up. If disabled it will turn it off. If unset it will neither enable nor
476 disable it, leaving the previous state unchanged. This means if another tool turns on auditing even
477 if <command>systemd-journald</command> left it off, it will still collect the generated
478 messages. Defaults to on.</para>
479
480 <para>Note that this option does not control whether <command>systemd-journald</command> collects
481 generated audit records, it just controls whether it tells the kernel to generate them. If you need
482 to prevent <command>systemd-journald</command> from collecting the generated messages, the socket
483 unit <literal>systemd-journald-audit.socket</literal> can be disabled and in this case this setting
484 is without effect.</para>
485
486 <xi:include href="version-info.xml" xpointer="v246"/>
487 </listitem>
488 </varlistentry>
489
490 <varlistentry>
491 <term><varname>TTYPath=</varname></term>
492
493 <listitem><para>Change the console TTY to use if
494 <varname>ForwardToConsole=yes</varname> is used. Defaults to
495 <filename>/dev/console</filename>.</para>
496
497 <xi:include href="version-info.xml" xpointer="v185"/></listitem>
498 </varlistentry>
499
500 <varlistentry>
501 <term><varname>LineMax=</varname></term>
502
503 <listitem><para>The maximum line length to permit when converting stream logs into record logs. When a systemd
504 unit's standard output/error are connected to the journal via a stream socket, the data read is split into
505 individual log records at newline (<literal>\n</literal>, ASCII 10) and <constant>NUL</constant> characters. If no such delimiter is
506 read for the specified number of bytes a hard log record boundary is artificially inserted, breaking up overly
507 long lines into multiple log records. Selecting overly large values increases the possible memory usage of the
508 Journal daemon for each stream client, as in the worst case the journal daemon needs to buffer the specified
509 number of bytes in memory before it can flush a new log record to disk. Also note that permitting overly large
510 line maximum line lengths affects compatibility with traditional log protocols as log records might not fit
511 anymore into a single <constant>AF_UNIX</constant> or <constant>AF_INET</constant> datagram. Takes a size in
512 bytes. If the value is suffixed with K, M, G or T, the specified size is parsed as Kilobytes, Megabytes,
513 Gigabytes, or Terabytes (with the base 1024), respectively. Defaults to 48K, which is relatively large but
514 still small enough so that log records likely fit into network datagrams along with extra room for
515 metadata. Note that values below 79 are not accepted and will be bumped to 79.</para>
516
517 <xi:include href="version-info.xml" xpointer="v235"/></listitem>
518 </varlistentry>
519
520 </variablelist>
521
522 </refsect1>
523
524 <refsect1>
525 <title>Forwarding to traditional syslog daemons</title>
526
527 <para>
528 Journal events can be transferred to a different logging daemon
529 in two different ways. With the first method, messages are
530 immediately forwarded to a socket
531 (<filename>/run/systemd/journal/syslog</filename>), where the
532 traditional syslog daemon can read them. This method is
533 controlled by the <varname>ForwardToSyslog=</varname> option. With a
534 second method, a syslog daemon behaves like a normal journal
535 client, and reads messages from the journal files, similarly to
536 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
537 With this, messages do not have to be read immediately,
538 which allows a logging daemon which is only started late in boot
539 to access all messages since the start of the system. In
540 addition, full structured meta-data is available to it. This
541 method of course is available only if the messages are stored in
542 a journal file at all. So it will not work if
543 <varname>Storage=none</varname> is set. It should be noted that
544 usually the <emphasis>second</emphasis> method is used by syslog
545 daemons, so the <varname>Storage=</varname> option, and not the
546 <varname>ForwardToSyslog=</varname> option, is relevant for them.
547 </para>
548 </refsect1>
549
550 <refsect1>
551 <title>See Also</title>
552 <para><simplelist type="inline">
553 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
554 <member><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
555 <member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
556 <member><citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
557 <member><citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
558 </simplelist></para>
559 </refsect1>
560
561 </refentry>