简体   繁体   English

从Rails的Graylog2获取日志的简单方法

[英]Easy way to get logs from Graylog2 on Rails

I'm logging my Rails app needs to graylog2 server, using Yell gem, and/or gelf-rb. 我正在使用Yell gem和/或gelf-rb将Rails应用程序的需求记录到graylog2服务器。

I've searched a lot on the web on how to access these logs from my app, using some custom fields to filter, but no luck yet. 我在网络上搜索了很多有关如何从我的应用程序访问这些日志的信息,其中使用一些自定义字段进行过滤,但还没有运气。

The only access i have to these messages are from graylog webserver. 我对这些消息的唯一访问权是来自graylog Web服务器。 But I need it from my app. 但是我需要从我的应用程序中获取它。 My users need to see some of these messages inside app. 我的用户需要在应用程序中查看其中一些消息。

There is something similar to activerecord to query and retrieve? 有什么类似于activerecord的查询和检索吗?

You can use for example Tire to access the Greylog's Elasticsearch database. 例如,您可以使用Tire来访问Greylog的Elasticsearch数据库。

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

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