fluent-plugin-scribe 0.10.8 → 0.10.9
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -17
- data/VERSION +1 -1
- data/fluent-plugin-scribe.gemspec +2 -2
- data/lib/fluent/plugin/out_scribe.rb +21 -24
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,47 +1,34 @@
|
|
1
|
-
Release 0.10.
|
1
|
+
Release 0.10.9 - 2011/05/30
|
2
|
+
* overwrite default value of buffer_chunk_limit to 1MB
|
3
|
+
* improve memory usage efficiency
|
2
4
|
|
5
|
+
Release 0.10.8 - 2011/04/27
|
3
6
|
* support msg_format option at in_scribe
|
4
7
|
|
5
|
-
|
6
8
|
Release 0.10.7 - 2011/02/04
|
7
|
-
|
8
9
|
* support add_newline option at out_scribe
|
9
10
|
|
10
|
-
|
11
11
|
Release 0.10.6 - 2011/01/23
|
12
|
-
|
13
12
|
* support add_prefix / remove_prefix option
|
14
13
|
* update thrift to 0.8.0
|
15
14
|
* support remove_newline option
|
16
15
|
|
17
|
-
|
18
16
|
Release 0.10.5 - 2011/11/16
|
19
|
-
|
20
17
|
* fixed broken gemspec
|
21
18
|
|
22
|
-
|
23
19
|
Release 0.10.4 - 2011/11/14
|
24
|
-
|
25
20
|
* fixed encoding problem (work-around for thrift-rb)
|
26
21
|
- contributed by @tagomoris and @frsyuki
|
27
22
|
|
28
|
-
|
29
23
|
Release 0.10.3 - 2011/10/16
|
30
|
-
|
31
24
|
* modify summary of gemspec
|
32
25
|
|
33
|
-
|
34
26
|
Release 0.10.2 - 2011/10/16
|
35
|
-
|
36
27
|
* implement out_scribe plugin
|
37
28
|
|
38
|
-
|
39
29
|
Release 0.10.1 - 2011/10/16
|
40
|
-
|
41
30
|
* added tests for in_scribe
|
42
31
|
* use Configurable, introduced from fluentd v0.10
|
43
32
|
|
44
|
-
|
45
33
|
Release 0.10.0 - 2011/10/16
|
46
|
-
|
47
34
|
* compatibility changes for fluentd v0.10
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.9
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "fluent-plugin-scribe"
|
8
|
-
s.version = "0.10.
|
8
|
+
s.version = "0.10.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kazuki Ohta"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-05-30"
|
13
13
|
s.email = "kazuki.ohta@gmail.com"
|
14
14
|
s.executables = ["fluent-scribe-remote"]
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,9 +25,9 @@ class ScribeOutput < BufferedOutput
|
|
25
25
|
config_param :field_ref, :string, :default => 'message'
|
26
26
|
config_param :timeout, :integer, :default => 30
|
27
27
|
|
28
|
-
config_param :remove_prefix, :string,
|
29
|
-
config_param :add_newline, :bool,
|
30
|
-
config_param :default_category, :string,
|
28
|
+
config_param :remove_prefix, :string, :default => nil
|
29
|
+
config_param :add_newline, :bool, :default => false
|
30
|
+
config_param :default_category, :string, :default => 'unknown'
|
31
31
|
|
32
32
|
def initialize
|
33
33
|
require 'thrift'
|
@@ -42,6 +42,9 @@ class ScribeOutput < BufferedOutput
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def configure(conf)
|
45
|
+
# override default buffer_chunk_limit
|
46
|
+
conf['buffer_chunk_limit'] ||= '1m'
|
47
|
+
|
45
48
|
super
|
46
49
|
end
|
47
50
|
|
@@ -69,11 +72,6 @@ class ScribeOutput < BufferedOutput
|
|
69
72
|
end
|
70
73
|
|
71
74
|
def write(chunk)
|
72
|
-
records = []
|
73
|
-
chunk.msgpack_each { |arr|
|
74
|
-
records << arr
|
75
|
-
}
|
76
|
-
|
77
75
|
socket = Thrift::Socket.new @host, @port, @timeout
|
78
76
|
transport = Thrift::FramedTransport.new socket
|
79
77
|
protocol = Thrift::BinaryProtocol.new transport, false, false
|
@@ -82,25 +80,24 @@ class ScribeOutput < BufferedOutput
|
|
82
80
|
transport.open
|
83
81
|
begin
|
84
82
|
entries = []
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
83
|
+
|
84
|
+
chunk.msgpack_each do |arr|
|
85
|
+
tag, record = arr
|
86
|
+
next unless record.has_key?(@field_ref)
|
87
|
+
|
88
|
+
entry = LogEntry.new
|
89
|
+
entry.category = tag
|
90
|
+
|
91
|
+
if @add_newline
|
91
92
|
entry.message = (record[@field_ref] + "\n").force_encoding('ASCII-8BIT')
|
92
|
-
|
93
|
-
}
|
94
|
-
else
|
95
|
-
records.each { |r|
|
96
|
-
tag, record = r
|
97
|
-
next unless record.has_key?(@field_ref)
|
98
|
-
entry = LogEntry.new
|
99
|
-
entry.category = tag
|
93
|
+
else
|
100
94
|
entry.message = record[@field_ref].force_encoding('ASCII-8BIT')
|
101
|
-
|
102
|
-
|
95
|
+
end
|
96
|
+
|
97
|
+
entries << entry
|
103
98
|
end
|
99
|
+
|
100
|
+
$log.info "Writing #{entries.count} entries to scribe"
|
104
101
|
client.Log(entries)
|
105
102
|
ensure
|
106
103
|
transport.close
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-scribe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|