简体   繁体   English

红宝石套接字日志服务器

[英]ruby socket log server

We use the default ruby logging module to log the errors. 我们使用默认的ruby日志记录模块来记录错误。 We use the delayed_job which is using many worker processes. 我们使用了使用了很多工作进程的delay_job。 So we could not manage the log files. 因此我们无法管理日志文件。

We need the ruby based log server with rolling file appender and archive facility so that we can push the logs to the log server and let the log server to manage the logging task. 我们需要具有滚动文件附加器和归档功能的基于ruby的日志服务器,以便我们可以将日志推送到日志服务器,并让日志服务器管理日志记录任务。

Do we have ruby based solution or other recommended solutions to manage this problem? 我们是否有基于红宝石的解决方案或其他推荐的解决方案来解决此问题?

Have you looked at Ruby's syslog in the standard library? 您是否在标准库中查看了Ruby的syslog? Normally the docs are non-existent, but the Rails docs seem to cover it, kinda. 通常情况下,这些文档是不存在的,但Rails文档似乎涵盖了它。 http://stdlib.rubyonrails.org/libdoc/syslog/rdoc/index.html http://stdlib.rubyonrails.org/libdoc/syslog/rdoc/index.html

Otherwise you can find out some info by looking through the syslog files themselves and reading http://glu.ttono.us/articles/2007/07/25/ruby-syslog-readme which is what I did when I started using it. 否则,您可以通过查看syslog文件本身并阅读http://glu.ttono.us/articles/2007/07/25/ruby-syslog-readme来查找一些信息,这是我开始使用它时所做的。

You don't say what OS you are on, but Mac OS and Linux have a very powerful syslog built in, which Ruby's syslog piggybacks on so you should be able to send to the system's syslog and have it split out your stream, roll the files, forward them, and do lots of other stuff with them. 您无需说说您使用的是什么操作系统,但是Mac OS和Linux内置了非常强大的syslog,Ruby的syslog附带在该日志上,因此您应该能够发送到系统的syslog并将其拆分出您的流,滚动到文件,将其转发,并对其进行其他处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM