shun0102 / fluent-logger-ruby

A structured logger for Fluentd (Ruby)

Home Page:http://fluentd.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fluent logger

A structured event loger

Examples

Simple

require 'fluent-logger'

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

# 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
Web site

fluent.github.com/

Documents

fluent.github.com/doc/

Source repository

github.com/fluent/fluent-logger-ruby

Author

Sadayuki Furuhashi

Copyright

© 2011 FURUHASHI Sadayuki

License

Apache License, Version 2.0

About

A structured logger for Fluentd (Ruby)

http://fluentd.org/

License:Other


Languages

Language:Ruby 100.0%