fluent-plugin-gelf-hs 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- �؅���up��
1
+ o�UG.�����:�'�P�W�M<�������UD��}�*��M�Ix;�3��$�i"�4bt�f%+�5��ф�u�R���.:9�
2
+  T������N$nY���C]�;s��i׳����RA���D�.���`?( ����)S�b�tyՖ��������. ����<CJ�S��n���Y�X�F�-��%���wTg�������H��!�B]���Pi�Aw3�q<xU�V�
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-gelf-hs"
6
- s.version = "1.0.1"
6
+ s.version = "1.0.2"
7
7
  s.authors = ["Alex Yamauchi", "Eric Searcy"]
8
8
  s.email = ["oss@hotschedules.com"]
9
9
  s.homepage = "https://github.com/bodhi-space/fluent-plugin-gelf-hs"
@@ -20,25 +20,31 @@ module Fluent
20
20
  gelfentry['_host'] = v
21
21
  end
22
22
  when 'level' then
23
- case v.to_s.downcase
23
+ case v.to_s.downcase[0]
24
24
  # emergency and alert aren't supported by gelf-rb
25
- when /^(0|emerg)/ then
25
+ when "0" then
26
26
  gelfentry['level'] = GELF::UNKNOWN
27
- when /^(1|a)/ then
27
+ when "1", "a" then
28
28
  gelfentry['level'] = GELF::UNKNOWN
29
- when /^(2|c)/ then
29
+ when "2", "c" then
30
30
  gelfentry['level'] = GELF::FATAL
31
- when /^(3|e)/ then
31
+ when "3" then
32
32
  gelfentry['level'] = GELF::ERROR
33
- when /^(4|w)/ then
33
+ when "4", "w" then
34
34
  gelfentry['level'] = GELF::WARN
35
35
  # gelf-rb also skips notice
36
- when /^(5|n)/ then
36
+ when "5", "n" then
37
37
  gelfentry['level'] = GELF::INFO
38
- when /^(6|i)/ then
38
+ when "6", "i" then
39
39
  gelfentry['level'] = GELF::INFO
40
- when /^(7|d)/ then
40
+ when "7", "d" then
41
41
  gelfentry['level'] = GELF::DEBUG
42
+ when "e" then
43
+ if v.to_s.length >= 2 and v.to_s.downcase[1] != "r" then
44
+ gelfentry['level'] = GELF::UNKNOWN
45
+ else
46
+ gelfentry['level'] = GELF::ERROR
47
+ end
42
48
  else
43
49
  gelfentry['_level'] = v
44
50
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gelf-hs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Yamauchi
metadata.gz.sig CHANGED
Binary file