开发者

Logging data with scribe

开发者 https://www.devze.com 2022-12-20 00:40 出处:网络
None of the scribe examples I\'ve seen 开发者_开发知识库actually mention the best way to take logs/logfiles and send them to scribe.I could configure a logrotate script that has a postrotate section t

None of the scribe examples I've seen 开发者_开发知识库actually mention the best way to take logs/logfiles and send them to scribe. I could configure a logrotate script that has a postrotate section that "cats" the rotated file to scribe (but then I get minutes latency at best).

The other option is to keep a "tail -f= | my_scribe_sender" and hope that the process never gets killed. However then you really can't guarantee that you're not missing/duplicating data.


These two links might be helpful:

http://sourceforge.net/projects/scribeserver/forums/forum/870823/topic/2551690

http://www.silassewell.com/blog/2009/05/12/pipe-apache-or-any-logs-to-scribe/


Answer given by Epcylon can be only used for 'cating' files, if you want per message logging this link can be useful: scribe and php, I don't know what language you use, so google them. There is a thrift interface that can be used with many languages.


If you are using PHP, here is a guide to making logging calls to a Scribe server: http://www.alphadevx.com/a/85-Logging-Messages-to-Scribe-from-PHP

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号