[PATCH v2 0/2] syslogd: filter messages by start of string and include other configs
Alexander Vickberg
wickbergster at gmail.com
Mon Mar 15 13:41:40 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.
v2 changelog:
* Some changes in second patch actually belonged to the first
* no need to check file at label cfgerr
* Bloatchecks updated
Bloat check on arm thumb, Yocto dunfell toolchain:
First patch:
function old new delta
syslogd_main 1652 1732 +80
timestamp_and_log 612 672 +60
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 140/0) Total: 140 bytes
Second patch:
function old new delta
parse_syslogdcfg - 708 +708
.rodata 90125 90133 +8
syslogd_main 1732 1126 -606
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 716/-606) Total: 110 bytes
Bloat check on x86-64, Ubuntu 20.04 toolchain:
First patch:
function old new delta
syslogd_main 2210 2336 +126
timestamp_and_log 785 877 +92
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 218/0) Total: 218 bytes
Second patch:
function old new delta
parse_syslogdcfg - 1051 +1051
.rodata 97597 97605 +8
syslogd_main 2336 1451 -885
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 1059/-885) Total: 174 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