fluent-plugin-file-alternative 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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-file-alternative"
5
- gem.version = "0.1.0"
5
+ gem.version = "0.1.1"
6
6
 
7
7
  gem.authors = ["TAGOMORI Satoshi"]
8
8
  gem.email = ["tagomoris@gmail.com"]
@@ -253,8 +253,13 @@ class Fluent::FileAlternativeOutput < Fluent::TimeSlicedOutput
253
253
  @path_suffix = conf['path'][pos+1..-1]
254
254
  conf['buffer_path'] ||= "#{conf['path']}"
255
255
  elsif (conf['path'] || '%Y') !~ /%Y|%m|%d|%H|%M|%S/
256
- @path_prefix = conf['path'] + "."
257
- @path_suffix = ".log"
256
+ if conf['path'] =~ /\.log\Z/
257
+ @path_prefix = conf['path'][0..-4]
258
+ @path_suffix = ".log"
259
+ else
260
+ @path_prefix = conf['path'] + "."
261
+ @path_suffix = ".log"
262
+ end
258
263
  conf['buffer_path'] ||= "#{conf['path']}.*"
259
264
  elsif (conf['path'] || '') =~ /%Y|%m|%d|%H|%M|%S/
260
265
  conf['buffer_path'] ||= conf['path'].gsub('%Y','yyyy').gsub('%m','mm').gsub('%d','dd').gsub('%H','HH').gsub('%M','MM').gsub('%S','SS')
@@ -302,7 +307,7 @@ class Fluent::FileAlternativeOutput < Fluent::TimeSlicedOutput
302
307
  end while File.exist?(path)
303
308
  path
304
309
  else
305
- "#{@path_prefix}#{chunk_key}_#{@path_suffix}#{suffix}"
310
+ "#{@path_prefix}#{chunk_key}#{@path_suffix}#{suffix}"
306
311
  end
307
312
  else
308
313
  if @compress
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-file-alternative
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-16 00:00:00.000000000Z
12
+ date: 2012-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
16
- requirement: &2168521620 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2168521620
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: fluentd
27
- requirement: &2168521180 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *2168521180
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  description: alternative implementation of out_file, with various configurations
37
47
  email:
38
48
  - tagomoris@gmail.com
@@ -70,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
80
  version: '0'
71
81
  requirements: []
72
82
  rubyforge_project:
73
- rubygems_version: 1.8.6
83
+ rubygems_version: 1.8.21
74
84
  signing_key:
75
85
  specification_version: 3
76
86
  summary: alternative implementation of out_file