ubox: Remove unnecessary memset calls. Change to calloc instead. Less verbose. Signed-off-by: Rosen Penev <rosenp@gmail.com>
logd: move stripping of newlines to log_add() Signed-off-by: Felix Fietkau <nbd@nbd.name>
logd: enforce line length limit for ubus based log messages as well Signed-off-by: Felix Fietkau <nbd@nbd.name>
logd: use uloop instead of ustream_fd for syslog Using a stream buffer for a datagram socket makes no sense. This change fixes dealing with line buffer truncation on large incoming messages Signed-off-by: Felix Fietkau <nbd@nbd.name>
log/syslog: Add missing static to two structs. On x86, binary size goes down by 16 bytes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
syslog: remove unnecessary sizeof struct between messages The next message needs to be written after the data of current message. This was adding "sizeof(struct log_head)" bytes between messages. Signed-off-by: Dan Bugnar <danutbug@gmail.com>
ubox/logd: free regex's on log_shutdown() call Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
fix gcc format security error Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
log: make valgrind less complain by freeing allocated memory Signed-off-by: Luka Perkov <luka@openwrt.org>
log: fix whitespaces Signed-off-by: Luka Perkov <luka@openwrt.org>
logd: fix internal buffer size Signed-off-by: John Crispin <blogic@openwrt.org>
logd: revert the log size changes Signed-off-by: John Crispin <blogic@openwrt.org>
logd: prevent the buffer from being bigger than the maximum ubus size Signed-off-by: John Crispin <blogic@openwrt.org>
logd: allow setting the buffer size from the command line Signed-off-by: John Crispin <blogic@openwrt.org>
add log daemon Signed-off-by: John Crispin <blogic@openwrt.org>