| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Provides easier access to log messages
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When streaming the syslog messages via udp, the socket connection
always succeeds by definition, but it can still fail to send. In such
case, the syslog keep repeating the following two messages:
failed to send log data to ip:port via udp
Logread connected to ip:port
With this change, only one initial message "Logread connected to..." is
logged.
Also fixed capital letter for "failed to send" message.
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
Signed-off-by: Daniel Golle <daniel@makrotopia.org> (string de-duplication)
|
|
|
|
|
| |
Fixes: 41664054b8b1 ("logd: fix ignored return values in set{gid,uid}")
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ubuntu 18.05 with gcc-7.5 yields following error:
ubox/log/logd.c:263:3: error: ignoring return value of ‘setuid’, declared with attribute warn_unused_result [-Werror=unused-result]
setuid(p->pw_uid);
^~~~~~~~~~~~~~~~~
ubox/log/logd.c:264:3: error: ignoring return value of ‘setgid’, declared with attribute warn_unused_result [-Werror=unused-result]
setgid(p->pw_gid);
^~~~~~~~~~~~~~~~~
Fixes: 9ef886819dd4 ("logd: self-degrade to 'logd' user after opening pipes")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
|
|
|
| |
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds filtering options for facilities as follows:
-z <facility> handle only messages with given facility (0-23), repeatable
-Z <facility> ignore messages with given facility (0-23), repeatable
With that
* 'logread -z 2 -z 16' will display all MAIL and LOCAL0 messages, while
* 'logread -Z 2 -Z 16' will display all but MAIL and LOCAL0 messages
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
Saves 872 bytes on Ubuntu 16.04. No change in functionality.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
| |
Change to calloc instead. Less verbose.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
Fixes a race condition in dealing with larger amounts of log data
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
| |
This will terminate the connection after all log messages have been
sent. Useful for logread without follow
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
On x86, binary size goes down by 16 bytes.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
| |
The latter is more compatible with older GCC versions like 4.9. Additionally, initializing with { 0 } produces a warning that only the first field was initialized.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Systemwide timestamps for syslog messages with ms accuracy are usefull
for debugging timing problems.
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
|
|
|
|
|
|
| |
Avoids leaking memory when exiting early.
Signed-off by: Rosen <rosenp@gmail.com>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
|
|
| |
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
Useful for JSON-RPC access via uhttpd
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
trying to access the data
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
| |
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|
|
|
|
|
|
| |
This allows printing/streaming/writing messages matching a specified
basic regular expression only.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|
|
|
|
|
| |
No need to construct every time the same blob_buf for each client in the list.
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: Christian Mehlis <christian@m3hlis.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
| |
this fixes the size limitation patch.
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|