cloudflare / lua-resty-logger-socket

Raw-socket-based Logger Library for Nginx (based on ngx_lua)
488 stars 130 forks source link

是否可以结合rsyslogd服务使用 #18

Open zhaoshengxian opened 8 years ago

zhaoshengxian commented 8 years ago

本人结合rsyslog使用的时候发现, 1、发送过去的msg 无法正常接收,必须要改成#msg .." "..msg才可以传送过去,而且syslog这边必须要通过%rawmsg%才能接收到 2、syslog服务在接收发送过来的数据的时候无法获取 syslogtag内容。 麻烦帮忙解答。

agentzh commented 8 years ago

@zhaoshengxian Please, no Chinese here. This place is English only. Many of our developers cannot read Chinese. Thank you for your cooperation.

flisky commented 8 years ago

Yes, absolutely.

You should follow the format from rfc3164 or rfc5424 to construct your message, and then send it to rsyslog. And rsyslogd -dn helps to see what happens on the rsyslogd side.

A tip, you may want to turn off useSpecialParser for imuxsock module:)

tanxiaolong commented 7 years ago

@flisky As the description says: "This lua library is a remote logging module for ngx_lua", this module doesn't support unix-socket right? just tcp/upd is supported? thx for reply!

flisky commented 7 years ago

@tanxiaolong see PR #20.