Commit Graph

863 Commits

Author SHA1 Message Date
Joachim Wiberg
91ef7f4d59 Bump version for v2.5.1 bugfix release cycle
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-25 14:40:47 +02:00
Joachim Wiberg
ba35121290 Fix #64: sub-second faking of kernel timestamps
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-09 10:50:07 +02:00
Joachim Wiberg
7e8243e48f Minor, fix initializer: 0 vs NULL
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-07-09 10:45:50 +02:00
Joachim Wiberg
b6d1ae2667 Bump version and update ChangeLog for v2.5.0 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-30 20:08:56 +02:00
Joachim Wiberg
f926039511 Update copyright years
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-30 20:06:33 +02:00
Joachim Wiberg
ae15ee11a7 lib: minor, ensure we have TIMESPEC_TO_TIMEVAL()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-30 20:02:51 +02:00
Joachim Wiberg
c6de7dfa69 Inform Coverity Scan we use relative time for alarm()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-22 09:31:38 +02:00
Joachim Wiberg
0cde7cbcc5 .github: bump version of actions for Node.js upgrade
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>
2023-04-22 09:18:07 +02:00
Joachim Wiberg
8768f9246b Clang workaround for valgrind checks
https://www.reddit.com/r/C_Programming/comments/wau4t5/weird_error_when_trying_to_run_valgrind_possibly

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-22 09:13:13 +02:00
Joachim Wiberg
5c33df4ca0 Update ChangeLog and bump version for upcoming v2.5.0 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-22 08:59:35 +02:00
Joachim Wiberg
218a032557 Fix #61: add support for -c and -cc to disable log compression
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>
2023-04-22 08:48:32 +02:00
Joachim Wiberg
b3d0a9b638 Revert "syslog.conf: disable debug messages by default from /var/log/syslog"
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>
2023-04-22 08:33:23 +02:00
Joachim Wiberg
7ec64e5f9c Fix #62: early log messages lost when running in systemd
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>
2023-04-22 08:27:57 +02:00
Joachim Wiberg
c82c004de7 syslogd.service: KillMode=process is not recommended, drop
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>
2023-04-22 07:40:24 +02:00
Joachim Wiberg
92066b2b86 .github: don't fail because tree returns non-zero ...
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>
2022-12-09 19:10:36 +01:00
Joachim Wiberg
153e6c4b65 Fix #60: document how to set side-wide permissions on log files
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-08 23:44:40 +01:00
Joachim Wiberg
b234244680
Merge pull request #59 from xiaoxiang781216/nuttx
Port sysklogd to NuttX

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-09 16:28:04 +01:00
anjiahao
b3502b84c4 Port sysklogd to NuttX
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-09 02:03:26 +08:00
Joachim Wiberg
51d471543c Update ChangeLog and bump version for v2.4.4 bug fix release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-13 20:02:12 +02:00
Joachim Wiberg
06ba111750
Merge pull request #58 from douzzer/20220813-fix-parsemsg_rfc3164-RemoteAddDate
20220813-fix-parsemsg_rfc3164-RemoteAddDate
2022-08-13 19:46:38 +02:00
Daniel Pouzzner
55b8d3ddfa syslogd.c parsemsg_rfc3164(): don't set buffer.timestamp.usec when RemoteAddDate
(-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.
2022-08-13 11:58:32 -05:00
Joachim Wiberg
ba9555870b Update ChangeLog and bump version for v2.4.3 bug fix release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-12 14:33:44 +02:00
Joachim Wiberg
9e9c1c884a Fix #57: garbled tag name in std log file output
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-12 14:30:19 +02:00
Joachim Wiberg
6bc8525a8d Ensure both logger and syslogd output the same version string
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>
2022-08-01 13:17:01 +02:00
Joachim Wiberg
7850591388 Update ChangeLog and bump version for v2.4.2 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 12:57:13 +02:00
Joachim Wiberg
7bd017be0a logger: fix default log severity info -> notice, like other loggers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 12:48:31 +02:00
Joachim Wiberg
a2ff3a93f6 libsyslog: drop extra leading space in message
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>
2022-08-01 12:37:19 +02:00
Joachim Wiberg
22ee326192 logger: drop trailing space when reading message from command line
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 12:28:59 +02:00
Joachim Wiberg
16bad57af5 Update ChangeLog and bump version for v2.4.1 release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:46:32 +02:00
Joachim Wiberg
a06639bd0e libsyslog: bump ABI version, changes/additions to interface
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:45:33 +02:00
Joachim Wiberg
51ecc21973 man: update syslogp.3 with latest changes for remote logging
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:34:55 +02:00
Joachim Wiberg
460e26f0f2 man: update change date and copyright years on logger.1
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:34:55 +02:00
Joachim Wiberg
4fdbb64c51 libsyslog: honor LIB_PTRIM when logging to stderr
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:34:55 +02:00
Joachim Wiberg
221ae0abe0 libsyslog: avoid opening+connecting to syslogd when LOG_NLOG
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 11:34:55 +02:00
Joachim Wiberg
4c39bfeccb Reorder man pages links and add logger(1)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-08-01 09:49:58 +02:00
Joachim Wiberg
87ff7d6901 test: verify remote logging in logger tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 22:56:16 +02:00
Joachim Wiberg
911e3f05a1 test: allow logger() to run w/o UNIX socket path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 22:49:37 +02:00
Joachim Wiberg
43d8640aac libsyslog: enforce 32 char limit on RFC3164 output to remote syslogd
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 18:48:39 +02:00
Joachim Wiberg
50f6ad74cb syslogd: ensure tag is <= 32 chars for RFC3164 output
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>
2022-07-31 18:48:26 +02:00
Joachim Wiberg
3969dbb8a6 Update with new details on the logger tool
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 17:32:36 +02:00
Joachim Wiberg
c095131ff9 man: update logger(1), it can log to remote servers now
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 17:32:13 +02:00
Joachim Wiberg
5662afe2c0 Adjust log file output format in BSD mode to output proc[PID] too
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 17:17:25 +02:00
Joachim Wiberg
0811315f35 Bump version and update ChangeLog w/ last fixes before next release
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 12:56:50 +02:00
Joachim Wiberg
8b513ade8e Fix log option flag: LOG_RFC3154 -> LOG_RFC3164
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 12:54:25 +02:00
Joachim Wiberg
7f4dcff60d Updates on project origin and naming
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 12:48:52 +02:00
Joachim Wiberg
f0b7b6fdf8 Merge branch 'master' into dev 2022-07-31 12:29:29 +02:00
Joachim Wiberg
70bfb8ed98 Handle gettimeofday() errors the same way everywhere
Problem found by Coverity Scan.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 12:21:23 +02:00
Joachim Wiberg
4f94756bf2 logger: add support for -I PID to log, e.g., $$ from a shell script
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 12:03:57 +02:00
Joachim Wiberg
f32ca837c1 logger: add support for -H NAME to override system hostname
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 11:48:58 +02:00
Joachim Wiberg
c7f65e11c9 logger: minor, coding style (reverse Christmas tree)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-07-31 11:44:29 +02:00