[PATCH v5 0/2] syslogd: filter messages by start of string and include other configs
Alexander Vickberg
wickbergster at gmail.com
Tue Mar 16 13:36:37 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.
v5 changelog:
* Check msg len before compare
* Bloatchecks updated
v4 changelog:
* Check for ending '[' or ':' when matching string
* Fix wrongfully used continue in second patch
* Bloatchecks updated
v3 changelog:
* actual v2
v2 changelog:
* Some changes in first patch actually belonged to the second
* no need to check file at label cfgerr
* Bloatchecks updated
Bloat check on arm thumb, Yocto dunfell toolchain:
First patch:
function old new delta
timestamp_and_log 612 712 +100
syslogd_main 1652 1732 +80
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 180/0) Total: 180 bytes
Second patch:
parse_syslogdcfg - 704 +704
.rodata 90125 90133 +8
syslogd_main 1732 1126 -606
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 712/-606) Total: 106 bytes
Bloat check on x86-64, Ubuntu 20.04 toolchain:
First patch:
function old new delta
timestamp_and_log 785 936 +151
syslogd_main 2210 2336 +126
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 277/0) Total: 277 bytes
Second patch:
function old new delta
parse_syslogdcfg - 1056 +1056
.rodata 97597 97605 +8
syslogd_main 2336 1451 -885
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 1064/-885) Total: 179 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 | 137 +++++++++++++++++++++++++++++++--------------
1 file changed, 96 insertions(+), 41 deletions(-)
--
2.25.1
More information about the busybox
mailing list