Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A structured logger for Fluentd (Ruby)
Ruby
Failed to load latest commit information.
bin add bin/fluent-post
lib v0.5.0
spec Update spec code to use latest fluentd
.gitignore Added simplecov-vim
.rspec refactoring / rename / test to rspec
.travis.yml Move 1.9.2 to allow_failures and add test-unit to Gemfile
AUTHORS first commit
COPYING first commit
ChangeLog v0.5.0
Gemfile Move 1.9.2 to allow_failures and add test-unit to Gemfile
README.md Attempt to the correct url
Rakefile refactoring / rename / test to rspec
VERSION v0.5.0
fluent-logger.gemspec

README.md

Fluent logger

A structured event logger

Examples

Simple

require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new(nil, :host=>'localhost', :port=>24224)
unless log.post("myapp.access", {"agent"=>"foo"})
  p log.last_error # You can get last error object via last_error method
end

# output: myapp.access {"agent":"foo"}

Singleton

require 'fluent-logger'

Fluent::Logger::FluentLogger.open(nil, :host=>'localhost', :port=>24224)
Fluent::Logger.post("myapp.access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}

Tag prefix

require 'fluent-logger'

log = Fluent::Logger::FluentLogger.new('myapp', :host=>'localhost', :port=>24224)
log.post("access", {"agent"=>"foo"})

# output: myapp.access {"agent":"foo"}

Loggers

Fluent

Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=>24224)

Console

Fluent::Logger::ConsoleLogger.open(io)

Null

Fluent::Logger::NullLogger.open
name description
Web site http://fluentd.org/
Documents http://docs.fluentd.org/
Source repository https://github.com/fluent/fluent-logger-ruby
Author Sadayuki Furuhashi
Copyright (c) 2011 FURUHASHI Sadayuki
License Apache License, Version 2.0
Something went wrong with that request. Please try again.