[PATCH 0/2] syslogd: filter messages by start of string and include other configs
Alexander Vickberg
wickbergster at gmail.com
Mon Mar 15 11:27:14 UTC 2021
These patches adds two features to syslogd. First patch adds the ability to
filter log messages by start of string, typically the daemon name. The second
patch adds the ability to include other configuration files using the 'include'
keyword. For example to parse the *.conf files in the folder /etc/syslog.d/ add
'include /etc/syslog.d/' to your main syslog.conf file.
Bloat check on arm thumb, Yocto dunfell toolchain:
First patch:
function old new delta
timestamp_and_log 612 672 +60
syslogd_main 1652 1692 +40
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 100/0) Total: 100 bytes
Second patch:
function old new delta
parse_syslogdcfg - 724 +724
.rodata 90125 90133 +8
syslogd_main 1692 1126 -566
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 732/-566) Total: 166 bytes
Bloat check on x86-64, Ubuntu 20.04 toolchain:
First patch:
function old new delta
syslogd_main 2210 2331 +121
timestamp_and_log 785 877 +92
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 213/0) Total: 213 bytes
Second patch:
function old new delta
parse_syslogdcfg - 1070 +1070
.rodata 97597 97605 +8
syslogd_main 2331 1451 -880
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 1078/-880) Total: 198 bytes
Alexander Vickberg (2):
syslogd: add ability to filter based on start of message
syslogd: allow to include other config files/dirs
sysklogd/syslogd.c | 116 ++++++++++++++++++++++++++++++++-------------
1 file changed, 84 insertions(+), 32 deletions(-)
--
2.25.1
More information about the busybox
mailing list