A structured event loger
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"}
require 'fluent-logger' Fluent::Logger::FluentLogger.open(nil, :host=>'localhost', :port=>24224) Fluent::Logger.post("myapp.access", {"agent"=>"foo"}) # output: myapp.access {"agent":"foo"}
require 'fluent-logger' log = Fluent::Logger::FluentLogger.new('myapp', :host=>'localhost', :port=>24224) log.post("access", {"agent"=>"foo"}) # output: myapp.access {"agent":"foo"}
Fluent::Logger::FluentLogger.open('tag_prefix', :host=>'localhost', :port=24224)
Fluent::Logger::ConsoleLogger.open(io)
Fluent::Logger::NullLogger.open
- Web site
- Documents
- Source repository
- Author
-
Sadayuki Furuhashi
- Copyright
-
© 2011 FURUHASHI Sadayuki
- License
-
Apache License, Version 2.0