A Ruby client for the Scribe distributed log server.
Copyright 2009 Twitter, Inc. See included LICENSE file.
The public certificate for this gem is here.
clean encapsulation of the Thrift API
Ruby 1.9 compatibility
The Github source repository is here. Patches and contributions are very welcome.
You need Ruby 1.8 or 1.9. If you have those, just run:
sudo gem install scribe
Now, start IRb and require the library:
Connect to a server:
client = Scribe.new('127.0.0.1')
Log a line:
Log a line with a category:
client.log("my app started up", "MyApp")
Batch a number of log lines and send them all at once:
client.batch do client.log("booting") client.log("loading data") client.log("success!") end
That is all.