Re: [LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-05-02 Thread Henry Chang
Hi Petr, > 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. The reason I chose to stay with logd is I wanna keep basing on ubus. > syslogd from Busybox handles log rotation very well,

Re: [LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-05-02 Thread Petr Štetiar
Henry Chang [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

Re: [LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-04-28 Thread Henry Chang
Hi, Since I got some questions from the subscribers, I'd like to explain more why I wanted to add this feature to a cutdown logging system logd instead of using a more comprehensive syslog implementation such as rsyslog. 1. logd is built-in logd is a built-in feature of ubox, and ubox is a heart

Re: [LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-04-28 Thread Henry Chang
According to the documentation, it needs a token as a credential in every single line of log. For example, the template for rsyslog is "<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [TOKEN@41058 tag=\"TAG\"] %msg%\n"

Re: [LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-04-27 Thread Baptiste Jonglez
Hi, On Thu, Apr 27, 2017 at 04:33:31PM -0700, Henry Chang wrote: > Hi, > > I would like to integrate logd with a cloud logging service. > The service only accepts certain format of log, so I decided to make logread > support an output template. Can't this service use standard syslog messages?

[LEDE-DEV] [PATCH ubox v2] Add template support to logread

2017-04-27 Thread Henry Chang
From: Henry Chang Hi, I would like to integrate logd with a cloud logging service. The service only accepts certain format of log, so I decided to make logread support an output template. Here's the usage: logread -T "%priority% %source% %message% %timestamp%"