Sha256: 5b30777c65d1c60b6497ef98eabd50803e2836eab8a727585fd31065dbb9d339

Contents?: true

Size: 838 Bytes

Versions: 8

Compression:

Stored size: 838 Bytes

Contents

#!/usr/bin/env ruby
require 'thrift'
require 'json'
$:.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 = 'debug.hoge'
entry.message = {'a' => 'b'}.to_json
p client.Log([entry])

transport.close

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fluent-plugin-scribe-1.0.0 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.14 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.13 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.12 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.11 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.10 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.9 bin/fluent-scribe-remote
fluent-plugin-scribe-0.10.8 bin/fluent-scribe-remote