fluentd 0.10.35 → 0.10.36
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- data/.travis.yml +13 -0
- data/ChangeLog +9 -0
- data/fluentd.gemspec +1 -1
- data/lib/fluent/buffer.rb +210 -214
- data/lib/fluent/command/fluentd.rb +4 -0
- data/lib/fluent/config.rb +1 -0
- data/lib/fluent/engine.rb +10 -10
- data/lib/fluent/output.rb +404 -406
- data/lib/fluent/plugin/buf_file.rb +146 -151
- data/lib/fluent/plugin/buf_memory.rb +62 -67
- data/lib/fluent/plugin/in_debug_agent.rb +27 -31
- data/lib/fluent/plugin/in_exec.rb +86 -90
- data/lib/fluent/plugin/in_forward.rb +171 -171
- data/lib/fluent/plugin/in_gc_stat.rb +43 -47
- data/lib/fluent/plugin/in_http.rb +214 -216
- data/lib/fluent/plugin/in_monitor_agent.rb +212 -214
- data/lib/fluent/plugin/in_object_space.rb +75 -79
- data/lib/fluent/plugin/in_status.rb +44 -50
- data/lib/fluent/plugin/in_stream.rb +159 -160
- data/lib/fluent/plugin/in_syslog.rb +149 -153
- data/lib/fluent/plugin/in_tail.rb +382 -387
- data/lib/fluent/plugin/out_copy.rb +40 -45
- data/lib/fluent/plugin/out_exec.rb +52 -57
- data/lib/fluent/plugin/out_exec_filter.rb +327 -331
- data/lib/fluent/plugin/out_file.rb +78 -74
- data/lib/fluent/plugin/out_forward.rb +410 -414
- data/lib/fluent/plugin/out_null.rb +15 -19
- data/lib/fluent/plugin/out_roundrobin.rb +63 -68
- data/lib/fluent/plugin/out_stdout.rb +9 -14
- data/lib/fluent/plugin/out_stream.rb +83 -90
- data/lib/fluent/plugin/out_test.rb +42 -46
- data/lib/fluent/supervisor.rb +15 -0
- data/lib/fluent/version.rb +1 -1
- data/test/plugin/in_stream.rb +2 -0
- data/test/plugin/out_file.rb +19 -1
- metadata +6 -5
data/lib/fluent/supervisor.rb
CHANGED
@@ -68,6 +68,7 @@ class Supervisor
|
|
68
68
|
@plugin_dirs = opt[:plugin_dirs]
|
69
69
|
@inline_config = opt[:inline_config]
|
70
70
|
@suppress_interval = opt[:suppress_interval]
|
71
|
+
@dry_run = opt[:dry_run]
|
71
72
|
|
72
73
|
@log = LoggerInitializer.new(@log_path, @log_level, @chuser, @chgroup)
|
73
74
|
@finished = false
|
@@ -78,6 +79,7 @@ class Supervisor
|
|
78
79
|
require 'fluent/load'
|
79
80
|
@log.init
|
80
81
|
|
82
|
+
dry_run if @dry_run
|
81
83
|
start_daemonize if @daemonize
|
82
84
|
install_supervisor_signal_handlers
|
83
85
|
until @finished
|
@@ -96,6 +98,19 @@ class Supervisor
|
|
96
98
|
end
|
97
99
|
|
98
100
|
private
|
101
|
+
|
102
|
+
def dry_run
|
103
|
+
read_config
|
104
|
+
change_privilege
|
105
|
+
init_engine
|
106
|
+
install_main_process_signal_handlers
|
107
|
+
run_configure
|
108
|
+
exit 0
|
109
|
+
rescue => e
|
110
|
+
$log.error "Dry run failed: #{e}"
|
111
|
+
exit 1
|
112
|
+
end
|
113
|
+
|
99
114
|
def start_daemonize
|
100
115
|
@wait_daemonize_pipe_r, @wait_daemonize_pipe_w = IO.pipe
|
101
116
|
|
data/lib/fluent/version.rb
CHANGED
data/test/plugin/in_stream.rb
CHANGED
@@ -134,6 +134,7 @@ class UnixInputTest < Test::Unit::TestCase
|
|
134
134
|
|
135
135
|
CONFIG = %[
|
136
136
|
path #{TMP_DIR}/unix
|
137
|
+
backlog 1000
|
137
138
|
]
|
138
139
|
|
139
140
|
def create_driver(conf=CONFIG)
|
@@ -143,6 +144,7 @@ class UnixInputTest < Test::Unit::TestCase
|
|
143
144
|
def test_configure
|
144
145
|
d = create_driver
|
145
146
|
assert_equal "#{TMP_DIR}/unix", d.instance.path
|
147
|
+
assert_equal 1000, d.instance.backlog
|
146
148
|
end
|
147
149
|
|
148
150
|
def connect
|
data/test/plugin/out_file.rb
CHANGED
@@ -9,7 +9,8 @@ class FileOutputTest < Test::Unit::TestCase
|
|
9
9
|
FileUtils.mkdir_p(TMP_DIR)
|
10
10
|
end
|
11
11
|
|
12
|
-
TMP_DIR = File.dirname(__FILE__) + "/../tmp"
|
12
|
+
TMP_DIR = File.expand_path(File.dirname(__FILE__) + "/../tmp")
|
13
|
+
SYMLINK_PATH = File.expand_path("#{TMP_DIR}/current")
|
13
14
|
|
14
15
|
CONFIG = %[
|
15
16
|
path #{TMP_DIR}/out_file_test
|
@@ -78,5 +79,22 @@ class FileOutputTest < Test::Unit::TestCase
|
|
78
79
|
path = d.run
|
79
80
|
assert_equal "#{TMP_DIR}/out_file_test._2.log.gz", path
|
80
81
|
end
|
82
|
+
|
83
|
+
def test_write_with_symlink
|
84
|
+
d = create_driver(CONFIG + %[
|
85
|
+
symlink_path #{SYMLINK_PATH}
|
86
|
+
])
|
87
|
+
symlink_path = "#{SYMLINK_PATH}.gz"
|
88
|
+
|
89
|
+
time = Time.parse("2011-01-02 13:14:15 UTC").to_i
|
90
|
+
d.emit({"a"=>1}, time)
|
91
|
+
|
92
|
+
# FileOutput#write returns path
|
93
|
+
path = d.run
|
94
|
+
assert File.exists?(symlink_path)
|
95
|
+
assert File.symlink?(symlink_path)
|
96
|
+
ensure
|
97
|
+
FileUtils.rm_rf(symlink_path)
|
98
|
+
end
|
81
99
|
end
|
82
100
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluentd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.36
|
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: 2013-
|
12
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
requirements:
|
97
97
|
- - ~>
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version: 1.1.
|
99
|
+
version: 1.1.1
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
102
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -104,7 +104,7 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - ~>
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 1.1.
|
107
|
+
version: 1.1.1
|
108
108
|
- !ruby/object:Gem::Dependency
|
109
109
|
name: http_parser.rb
|
110
110
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,6 +183,7 @@ extra_rdoc_files: []
|
|
183
183
|
files:
|
184
184
|
- .gitignore
|
185
185
|
- .rvmrc
|
186
|
+
- .travis.yml
|
186
187
|
- AUTHORS
|
187
188
|
- COPYING
|
188
189
|
- ChangeLog
|
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
287
|
version: '0'
|
287
288
|
segments:
|
288
289
|
- 0
|
289
|
-
hash:
|
290
|
+
hash: 1938960347567989865
|
290
291
|
requirements: []
|
291
292
|
rubyforge_project:
|
292
293
|
rubygems_version: 1.8.23
|