This patch imports the FreeBSD meaning to the `-c` command line option.
It disables "last message repeated" style log compression for repeated
log messages. A single `-c` disables compression for pipes, another
`-c` (-cc works) also disables compression for all other log targets.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This reverts commit 4fd55cd1ac because it
has caused more problems than it was intended to fix. If users get too
much debug log messages they can add this themselves, but if they don't
get their log messages they will believe there's something wrong with
their application generating the logs.
The file /var/log/syslog is supposed to log everything, except auth*.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This is a follow-up to d7576c7 which initially added support for running
in systemd based systems. Since the unit file sources the syslog.socket
we have /run/systemd/journal/syslog open already on descriptor 3. All
we need to do is verify that's the mode syslogd runs in.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The default 'control-group' ensures all processes started by sysklogd
are stopped when the service is stopped, this is what we want.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
With the change in ubuntu-latest at GitHub, the behavior of the classic
tree command has changed too. Just ignore any return code, the output
is merely for our viewing pleasure -- ocular inspection.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
(-T) -- fixes changes in 8f8332885 that resulted in "Jan 0 00:00:00" timestamps.
check_timestamp() saw the nonzero timestamp.usec and returned without setting
buffer->timestamp, leaving it with nonzero usecs and an all-zeros struct tm.
Slight differences in output when called with `-v` flag:
- Should output to stdout, that's what people expect (not an error)
- Should output *project* name and version, for syslogd this is not
so obvious since it *logs* 'syslogd vx.y.z' while the version is
'sysklogd vx.y.z'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When logging to a file we want a space to separate proc[pid]: from the
message, but for regular logging local/remote we don't want to inject
an extra space.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This may cause a bit of a regression for some users, but the RFC is
crystal clear on this point, the tag MUST NOT exceed 32 characters.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This is the first RFC5424 (only) support for for logging to a remote
host. The syntax continues to follow the FreeBSD logger.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>