logread: fix reconnect logd logic Signed-off-by: John Crispin <john@phrozen.org>
logrea: move the code setting up the request blob out of the main loop Signed-off-by: John Crispin <john@phrozen.org>
logread: move output connection setup code out of main loop Signed-off-by: John Crispin <john@phrozen.org>
logread: cleanup pid file handling Signed-off-by: John Crispin <john@phrozen.org>
ubox: Replace strerror(errno) with %m format. Saves 872 bytes on Ubuntu 16.04. No change in functionality. Signed-off-by: Rosen Penev <rosenp@gmail.com>
logread: fix line buffer size Signed-off-by: Felix Fietkau <nbd@nbd.name>
logread: remove leftover debug code Signed-off-by: Felix Fietkau <nbd@nbd.name>
logread: use oneshot mode without -f, wait for logd to close Fixes a race condition in dealing with larger amounts of log data Signed-off-by: Felix Fietkau <nbd@nbd.name>
logread: terminate after EOF Signed-off-by: Felix Fietkau <nbd@nbd.name>
ubox: Add an option for more accurate timestamps in log Systemwide timestamps for syslog messages with ms accuracy are usefull for debugging timing problems. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
logd: add support for sending log messages as replies Useful for JSON-RPC access via uhttpd Signed-off-by: Felix Fietkau <nbd@nbd.name>
logread: ensure that the len < sizeof(struct blob_attr) check runs before trying to access the data Signed-off-by: Felix Fietkau <nbd@openwrt.org>
log: allow filtering messages with a regexp pattern This allows printing/streaming/writing messages matching a specified basic regular expression only. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
log: remove unused callbacks Signed-off-by: Luka Perkov <luka@openwrt.org>
logread: add support for non-transparent-framing for Syslog over TCP https://tools.ietf.org/html/rfc6587#section-3.4.2 the idea is to add \n or \0 as message trailer so it's easier to find message end v2: simplify, use \n by default, with optional \0 Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
properly handle return codes Signed-off-by: John Crispin <blogic@openwrt.org>
syslog: use appropriate levels for logging Signed-off-by: Christian Mehlis <christian@m3hlis.de>
RFC 3164 compliant remote logging When logread daemon send a syslog message to another host, time, severity and facility are cut off. The message contains only text. This patch adds time, severity and facility in the message as described in the RFC 3164. Signed-off-by: Belkov Max <belkov-max@mail.ru>
logd: transport log data via the new ubus fd api this fixes the size limitation patch. Signed-off-by: John Crispin <blogic@openwrt.org>
logread: fix initial connect. we really need a better reconnect logic Signed-off-by: John Crispin <blogic@openwrt.org>