fluent-plugin-namedpipe 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-namedpipe"
|
4
|
-
gem.version = "0.0.
|
4
|
+
gem.version = "0.0.2"
|
5
5
|
gem.authors = ["anarcher"]
|
6
6
|
gem.email = ["anarcher@gmail.com"]
|
7
7
|
gem.description = %q{fluentd plugin to named pipe input }
|
@@ -14,7 +14,7 @@ module Fluent
|
|
14
14
|
config_param :path, :string
|
15
15
|
config_param :tag , :string
|
16
16
|
#TODO: Not use yet
|
17
|
-
|
17
|
+
config_param :receive_interval, :time, :default => 1
|
18
18
|
|
19
19
|
def configure(conf)
|
20
20
|
super
|
@@ -63,13 +63,13 @@ module Fluent
|
|
63
63
|
begin
|
64
64
|
lines = @pipe.gets
|
65
65
|
if lines.nil?
|
66
|
+
sleep @receive_interval
|
66
67
|
next
|
67
68
|
end
|
68
69
|
|
69
70
|
lines = lines.split("\n")
|
70
71
|
lines.each { |line|
|
71
72
|
time, record = parse_line(line)
|
72
|
-
log.debug("Line: #{time} #{record}")
|
73
73
|
if time && record
|
74
74
|
Engine.emit(@tag,time,record)
|
75
75
|
else
|