Instead of running the domark() timer on half the MarkInterval option,
we take the FreeBSD approach and run on each TIMERINTVL (30 sec), same
as the doflush() timer. This allows greater resolution on the MARK log
message, meaning we would be off by < 30 seconds instead of the current
MarkInterval / 2.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This also refactors the release job to use ncipollo/release-action@v1
instead of the deprecated actions/create-release@v1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
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>
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>
As reported on GitHub. When logging to a remote host, after a few
SIGHUP's we get the following log message:
Only 16 IP addresses per socket supported.
When closing all currently open sockets, the socket count must be reset
to allow for opening new ones, otherwise we'll run out of "counts".
Yes, this should be refactored to use the FreeBSD model implementation.
Problem introduced in v2.4.0, commit 075815e.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
No need to advertise that sysklogd is not kept up-to-date in all the
distros on the planet. Nothing much I can do about it.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Only to clean up, possibly relevant for no-MMU systems, but
they have other issues as well (e.g. fork) that prevent them
from using the sysklogd project.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This disables the "unauthenticated remote disk-filling service" by
default. A user can easily change this to 0 (or 2) to allow other
systems to log to their syslogd.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Logic for secure mode setting in .conf file
- Command line always wins
- SIGHUP activates changes
Note, if -s is given on command line it always wins, regardless.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Many projects use sysklogd with the shipped syslog.conf as their own
default /etc/syslog.conf. This is fine of course, but for many small
embedded systems getting all debug messages in the log by default is not
desirable.
This change drops debug messages from /var/log/syslog by default and
recommends admins to use /var/log/debug, or drop the debug filter.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch refactors the way the primary and secondary syslogd is
started by the test framework. The generalizations not only make the
code more readable, it hopefully also makes it easier to add new tests
in the future.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The usage text (syslogd -?) and the syslogd.8 man page was not in sync
wrt. the -b option. This patch updates it to match the layout of -a,
the -a option is also slightly updated.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Since we currently cannot test kernel logging, and we don't want to risk
any log messages from the kernel to suddenly pop up and disturb tests,
this patch explicitly disables it.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>