[LEDE-DEV] [PATCH ubox v2] Add template support to logread
Petr Štetiar
ynezz at true.cz
Tue May 2 03:11:41 PDT 2017
Henry Chang <mr.changyuheng at gmail.com> [2017-04-28 14:14:57]:
> 1. logd is built-in logd is a built-in feature of ubox, and ubox is a heart
> of OpenWrt/LEDE. If ubox can achieve all the use cases, we should simply
> just use it. Use rsyslog instead will create additional footprint in terms
> of resource while a lot of features in rsyslog is not going to be used.
>From my point of view and experience, logd is good for simple use cases. For
anything else I would recommend you to use syslogd from Busybox for example.
> "Simple plain text files also require log rotation to prevent them
> from becoming too large. In log rotation, existing log files are
syslogd from Busybox handles log rotation very well, including multiple old
files. AFAIK logd doesn't support more then one rotated file.
> 3. To make a working and secure remote logging pipeline, what we need
> is just logread, stunnel, and a log server. A log server will probably
> need some sort of special format in order to do the authentication or
> classification. So without template feature in logread, we'll need
> another service in between logread and stunnel for just manipulating
> every line of the log or we write another logread to achieve this.
> While logread already has some sort of object of the log, doing this
> in logread will be easier for both programmers and the computer.
What about log uploading over HTTPS, using curl and a few lines of shell
script? I bet, that some of those cloud log services support such input
source, you can tag and format it as needed also.
> 4. The template feature in this patch is very efficient. It doesn't
> create any overhead if the user doesn't enable this feature by passing
> the corresponding argument. The string replacement is also efficient,
> we can improve it by optimizing some strlen() function calls for sure
> but basically it's efficient enough.
It seems to me, that you're just trying to bend actual and simple tools for
your use case, instead of using right tools for the job.
-- ynezz
More information about the Lede-dev
mailing list