syslog.conf(5) reads The level describes the severity of the message, and is a keyword from the following ordered list (higher to lower): emerg, crit, alert, err, warning, notice, info and debug. but /usr/include/syslog.h gives /* * priorities/facilities are encoded into a single 32-bit quantity, where the * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility * (0-big number). Both the priorities and the facilities map roughly * one-to-one to strings in the syslogd(8) source code. This mapping is * included in this file. * * priorities (these are ordered) */ #define LOG_EMERG 0 /* system is unusable */ #define LOG_ALERT 1 /* action must be taken immediately */ #define LOG_CRIT 2 /* critical conditions */ #define LOG_ERR 3 /* error conditions */ #define LOG_WARNING 4 /* warning conditions */ #define LOG_NOTICE 5 /* normal but significant condition */ #define LOG_INFO 6 /* informational */ #define LOG_DEBUG 7 /* debug-level messages */
Created attachment 228072 [details] patch to syslog.conf.5 Change order of message severity to match syslog.h.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8678140127296c15894094087b81f71fe79a21d9 commit 8678140127296c15894094087b81f71fe79a21d9 Author: Felix Guest <felix.the.red@gmail.com> AuthorDate: 2021-09-21 15:29:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-09-21 16:07:39 +0000 syslog.conf.5: Fix the message priority order PR: 219942 MFC after: 1 week usr.sbin/syslogd/syslog.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=742450a7eb40e2b44326c0a400b9c61bad6c4d38 commit 742450a7eb40e2b44326c0a400b9c61bad6c4d38 Author: Felix Guest <felix.the.red@gmail.com> AuthorDate: 2021-09-21 15:29:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-09-28 13:21:51 +0000 syslog.conf.5: Fix the message priority order PR: 219942 (cherry picked from commit 8678140127296c15894094087b81f71fe79a21d9) usr.sbin/syslogd/syslog.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=e6e5d9bf97440cdf510a410225cad0f507a1eed7 commit e6e5d9bf97440cdf510a410225cad0f507a1eed7 Author: Felix Guest <felix.the.red@gmail.com> AuthorDate: 2021-09-21 15:29:39 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-09-28 13:22:14 +0000 syslog.conf.5: Fix the message priority order PR: 219942 (cherry picked from commit 8678140127296c15894094087b81f71fe79a21d9) usr.sbin/syslogd/syslog.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks for the report and patch.