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

Henry Chang mr.changyuheng at gmail.com
Thu Apr 27 22:59:09 PDT 2017


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 at 41058 tag=\"TAG\"] %msg%\n"

https://www.loggly.com/docs/rsyslog-manual-configuration/

On Thu, Apr 27, 2017 at 10:20 PM, Baptiste Jonglez
<baptiste at bitsofnetworks.org> wrote:
> 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?
>
> E.g. by using something like:
>
>   config system
>       option log_remote '1'
>       option log_ip '42.42.42.42'
>
>> Here's the usage:
>>
>> logread -T "%priority% %source% %message% %timestamp%"
>>
>> Currently supports 4 keywords: priority, source, message, timestamp.
>> The keywords should be surrounded by percent signs as showed above.
>>
>> Regards,
>>
>> Henry Chang
>>
>> Henry Chang (1):
>>   logread: Add support for output template
>>
>>  log/logread.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++----------
>>  1 file changed, 127 insertions(+), 26 deletions(-)



More information about the Lede-dev mailing list