fluent-plugin-cat-sweep 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +4 -0
- data/example.conf +20 -0
- data/fluent-plugin-cat-sweep.gemspec +3 -3
- data/lib/fluent/plugin/in_cat_sweep.rb +4 -3
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d592c2a70cecbfcd6e6d9d034d7f8587d98c91d
|
4
|
+
data.tar.gz: 658b34062c8f638cdf26e63a81107a56fac2710c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ba2f13b2cfdddd6146de2ea4d7ed8887f01fcce256be62f657e70a70c708dcc13e3acec9cdcae18d42d02e58a24aa3828a0b144fb54fb00fe207c1429be33a
|
7
|
+
data.tar.gz: 17f4d69c1cba812a3fb49c5313e875209deb554cacb66f1693ca7849e9b89f53a72e23c5ede43143b069c5218c78a2cc18f038f3d9b30fecd2041ac2242f4239
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -84,6 +84,10 @@ Our assumption is that this mechanism should provide more durability than `in_ta
|
|
84
84
|
</source>
|
85
85
|
```
|
86
86
|
|
87
|
+
## ChangeLog
|
88
|
+
|
89
|
+
[CHANGELOG.md](CHANGELOG.md)
|
90
|
+
|
87
91
|
## Contributing
|
88
92
|
|
89
93
|
1. Fork it ( https://github.com/civitaspo/fluent-plugin-cat-sweep/fork )
|
data/example.conf
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
<source>
|
2
|
+
type cat_sweep
|
3
|
+
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}"
|
4
|
+
|
5
|
+
file_path_with_glob tmp/test/*
|
6
|
+
format none
|
7
|
+
tag raw.eventlog
|
8
|
+
|
9
|
+
waiting_seconds 60
|
10
|
+
move_to /tmp/move_to
|
11
|
+
|
12
|
+
processing_file_suffix .processing # default: .processing
|
13
|
+
error_file_suffix .error # default: .error
|
14
|
+
oneline_max_bytes 536870912 # default: 512MB
|
15
|
+
run_interval 5 # default: 5 sec
|
16
|
+
</source>
|
17
|
+
|
18
|
+
<match **>
|
19
|
+
type stdout
|
20
|
+
</match>
|
@@ -4,9 +4,9 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-cat-sweep"
|
7
|
-
spec.version = "0.1.
|
8
|
-
spec.authors = ["Civitaspo(takahiro.nakayama)"]
|
9
|
-
spec.email = ["civitaspo@gmail.com"]
|
7
|
+
spec.version = "0.1.1"
|
8
|
+
spec.authors = ["Civitaspo(takahiro.nakayama)", "Naotoshi Seo"]
|
9
|
+
spec.email = ["civitaspo@gmail.com", "sonots@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = %q{Fluentd plugin to cat files and move them.}
|
12
12
|
spec.description = spec.summary
|
@@ -90,7 +90,7 @@ module Fluent
|
|
90
90
|
processing_filename = get_processing_filename(filename)
|
91
91
|
begin
|
92
92
|
lock_with_renaming(filename, processing_filename) do
|
93
|
-
process(processing_filename)
|
93
|
+
process(filename, processing_filename)
|
94
94
|
after_processing(processing_filename)
|
95
95
|
end
|
96
96
|
rescue => e
|
@@ -196,11 +196,12 @@ module Fluent
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
-
def process(
|
200
|
-
File.open(
|
199
|
+
def process(original_filename, processing_filename)
|
200
|
+
File.open(processing_filename, 'r') do |tfile|
|
201
201
|
read_each_line(tfile) do |line|
|
202
202
|
emit_message(line)
|
203
203
|
end
|
204
|
+
log.debug { %[in_cat_sweep: process: {filename:"#{original_filename}",size:#{tfile.size}}] }
|
204
205
|
end
|
205
206
|
end
|
206
207
|
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-cat-sweep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Civitaspo(takahiro.nakayama)
|
8
|
+
- Naotoshi Seo
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: fluentd
|
@@ -111,17 +112,20 @@ dependencies:
|
|
111
112
|
description: Fluentd plugin to cat files and move them.
|
112
113
|
email:
|
113
114
|
- civitaspo@gmail.com
|
115
|
+
- sonots@gmail.com
|
114
116
|
executables: []
|
115
117
|
extensions: []
|
116
118
|
extra_rdoc_files: []
|
117
119
|
files:
|
118
120
|
- ".gitignore"
|
119
121
|
- ".travis.yml"
|
122
|
+
- CHANGELOG.md
|
120
123
|
- CODE_OF_CONDUCT.md
|
121
124
|
- Gemfile
|
122
125
|
- LICENSE.txt
|
123
126
|
- README.md
|
124
127
|
- Rakefile
|
128
|
+
- example.conf
|
125
129
|
- fluent-plugin-cat-sweep.gemspec
|
126
130
|
- lib/fluent/plugin/in_cat_sweep.rb
|
127
131
|
- test/helper.rb
|