百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

logstash-logger

> 数据库
开源

记录 logstash 事件的 Ruby 日志记录器

462 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

记录 logstash 事件的 Ruby 日志记录器

LogStashLogger

LogStashLogger extends Ruby's Logger class to log directly to Logstash. It supports writing to various outputs in logstash JSON format. This is an improvement over writing to a file or syslog since Logstash can receive the structured data directly.

Features

  • Can write directly to a logstash listener over a UDP or TCP/SSL connection.
  • Can write to a file, Redis, Kafka, Kinesis, Firehose, a unix socket, syslog, stdout, or stderr.
  • Logger can take a string message, a hash, a LogStash::Event, an object, or a JSON string as input.
  • Events are automatically populated with message, timestamp, host, and severity.
  • Writes in logstash JSON format, but supports other formats as well.
  • Can write to multiple outputs.
  • Log messages are buffered and automatically re-sent if there is a connection problem.
  • Easily integrates with Rails via configuration.

Installation

Add this line to your application's Gemfile:

gem 'logstash-logger'

And then execute:

$ bundle

Or install it yourself as:

$ gem install logstash-logger

Ruby Compatibility

Verified to work with:

  • MRI Ruby 3.2, 3.3, 3.4, 4.0
  • JRuby 10.x

Ruby versions < 3.2 are EOL'ed and no longer supported.

Documentation

  • Usage Examples - Logger types, formatters, and URI configuration
  • Output Configuration - Logstash listener and HTTP setup
  • SSL/TLS - Secure connections and hostname verification
  • Customization - Custom fields, silencing, and error handling
  • Buffering - Buffer settings, retries, and sync mode
  • Rails Integration - Full Rails configuration guide
  • Troubleshooting - Common issues and breaking changes

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Issues· 14 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyjsonlogginglogging-librarylogstash

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库