2012-01-04 23:40:04 +04:00
%{
2017-11-19 21:06:10 +03:00
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#endif
2012-01-04 23:40:04 +04:00
#include <stddef.h>
2012-08-24 03:46:38 +04:00
#include <sys/socket.h>
2012-01-04 23:40:04 +04:00
#include "conf-parser.h"
2012-11-12 20:29:07 +04:00
#include "journald-server.h"
2012-01-04 23:40:04 +04:00
%}
struct ConfigPerfItem;
%null_strings
%language=ANSI-C
%define slot-name section_and_lvalue
%define hash-function-name journald_gperf_hash
%define lookup-function-name journald_gperf_lookup
%readonly-tables
%omit-struct-type
%struct-type
%includes
%%
2014-03-04 00:14:07 +04:00
Journal.Storage, config_parse_storage, 0, offsetof(Server, storage)
Journal.Compress, config_parse_bool, 0, offsetof(Server, compress)
Journal.Seal, config_parse_bool, 0, offsetof(Server, seal)
2017-07-15 14:57:52 +03:00
Journal.ReadKMsg, config_parse_bool, 0, offsetof(Server, read_kmsg)
2014-03-04 00:14:07 +04:00
Journal.SyncIntervalSec, config_parse_sec, 0, offsetof(Server, sync_interval_usec)
2016-04-26 21:46:20 +03:00
# The following is a legacy name for compatibility
2014-03-04 00:14:07 +04:00
Journal.RateLimitInterval, config_parse_sec, 0, offsetof(Server, rate_limit_interval)
2016-04-26 21:46:20 +03:00
Journal.RateLimitIntervalSec,config_parse_sec, 0, offsetof(Server, rate_limit_interval)
2014-03-04 00:14:07 +04:00
Journal.RateLimitBurst, config_parse_unsigned, 0, offsetof(Server, rate_limit_burst)
2016-10-04 18:13:21 +03:00
Journal.SystemMaxUse, config_parse_iec_uint64, 0, offsetof(Server, system_storage.metrics.max_use)
Journal.SystemMaxFileSize, config_parse_iec_uint64, 0, offsetof(Server, system_storage.metrics.max_size)
Journal.SystemKeepFree, config_parse_iec_uint64, 0, offsetof(Server, system_storage.metrics.keep_free)
Journal.SystemMaxFiles, config_parse_uint64, 0, offsetof(Server, system_storage.metrics.n_max_files)
Journal.RuntimeMaxUse, config_parse_iec_uint64, 0, offsetof(Server, runtime_storage.metrics.max_use)
Journal.RuntimeMaxFileSize, config_parse_iec_uint64, 0, offsetof(Server, runtime_storage.metrics.max_size)
Journal.RuntimeKeepFree, config_parse_iec_uint64, 0, offsetof(Server, runtime_storage.metrics.keep_free)
Journal.RuntimeMaxFiles, config_parse_uint64, 0, offsetof(Server, runtime_storage.metrics.n_max_files)
2014-03-04 00:14:07 +04:00
Journal.MaxRetentionSec, config_parse_sec, 0, offsetof(Server, max_retention_usec)
Journal.MaxFileSec, config_parse_sec, 0, offsetof(Server, max_file_usec)
Journal.ForwardToSyslog, config_parse_bool, 0, offsetof(Server, forward_to_syslog)
Journal.ForwardToKMsg, config_parse_bool, 0, offsetof(Server, forward_to_kmsg)
Journal.ForwardToConsole, config_parse_bool, 0, offsetof(Server, forward_to_console)
2014-03-14 03:38:15 +04:00
Journal.ForwardToWall, config_parse_bool, 0, offsetof(Server, forward_to_wall)
2014-03-04 00:14:07 +04:00
Journal.TTYPath, config_parse_path, 0, offsetof(Server, tty_path)
Journal.MaxLevelStore, config_parse_log_level, 0, offsetof(Server, max_level_store)
Journal.MaxLevelSyslog, config_parse_log_level, 0, offsetof(Server, max_level_syslog)
Journal.MaxLevelKMsg, config_parse_log_level, 0, offsetof(Server, max_level_kmsg)
Journal.MaxLevelConsole, config_parse_log_level, 0, offsetof(Server, max_level_console)
2014-03-14 03:38:15 +04:00
Journal.MaxLevelWall, config_parse_log_level, 0, offsetof(Server, max_level_wall)
2014-03-04 00:14:07 +04:00
Journal.SplitMode, config_parse_split_mode, 0, offsetof(Server, split_mode)
journald: make maximum size of stream log lines configurable and bump it to 48K (#6838)
This adds a new setting LineMax= to journald.conf, and sets it by
default to 48K. When we convert stream-based stdout/stderr logging into
record-based log entries, read up to the specified amount of bytes
before forcing a line-break.
This also makes three related changes:
- When a NUL byte is read we'll not recognize this as alternative line
break, instead of silently dropping everything after it. (see #4863)
- The reason for a line-break is now encoded in the log record, if it
wasn't a plain newline. Specifically, we distuingish "nul",
"line-max" and "eof", for line breaks due to NUL byte, due to the
maximum line length as configured with LineMax= or due to end of
stream. This data is stored in the new implicit _LINE_BREAK= field.
It's not synthesized for plain \n line breaks.
- A randomized 128bit ID is assigned to each log stream.
With these three changes in place it's (mostly) possible to reconstruct
the original byte streams from log data, as (most) of the context of
the conversion from the byte stream to log records is saved now. (So,
the only bits we still drop are empty lines. Which might be something to
look into in a future change, and which is outside of the scope of this
work)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86465
See: #4863
Replaces: #4875
2017-09-22 11:22:24 +03:00
Journal.LineMax, config_parse_line_max, 0, offsetof(Server, line_max)