Sha256: 5d54d451298ceeb96343774e14a11cacd5ac243d3c97b4afe8598cef24338805
Contents?: true
Size: 803 Bytes
Versions: 1
Compression:
Stored size: 803 Bytes
Contents
#!/usr/bin/env ruby require 'thrift' $:.unshift File.join(File.dirname(__FILE__), '../lib/fluent/plugin/thrift') require 'fb303_types' require 'fb303_constants' require 'facebook_service' require 'scribe_types' require 'scribe_constants' require 'scribe' host = 'localhost' port = 1463 socket = Thrift::Socket.new host, port.to_i transport = Thrift::FramedTransport.new socket protocol = Thrift::BinaryProtocol.new transport, false, false client = Scribe::Client.new protocol transport.open # 2011/09/02 Kazuki Ohta <kazuki.ohta@gmail.com> # explicitly specify TCP_NODELAY for low-latency communication. raw_sock = socket.to_io raw_sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1 entry = LogEntry.new entry.category = 'hoge' entry.message = 'fuga' p client.Log([entry]) transport.close
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-scribe-0.9.9 | bin/fluent-scribe-remote |