fluent-plugin-syslog_rfc5424 0.7.1.alpha3 → 0.7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b48ffa9b862c6c8b5702cd03cc770ebac19253b
|
4
|
+
data.tar.gz: 0c731a33f0852e99b92394914cff3e961dd52412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ed768e5e2ba2e23b610c55c6d36f93a19e6c6744afc2b6e5e3388fe6c33aed722e3f281218c710dea39d9cfacf0f537edde4700153dc4dcdf361d636eb0a9db
|
7
|
+
data.tar.gz: fa0e4d70b88fcd9c7c422b5f272042ee8ba61387cc7462817b2468e4cdae86963a00d5055c4999efec1d70bb511d660ee1fdf089853cd11e6188860f10cd0220
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-syslog_rfc5424"
|
7
|
-
spec.version = "0.7.1
|
7
|
+
spec.version = "0.7.1"
|
8
8
|
spec.authors = ["Pivotal"]
|
9
9
|
spec.email = %w(cf-loggregator@pivotal.io)
|
10
10
|
spec.homepage = "https://github.com/cloudfoundry/fluent-plugin-syslog_rfc5424"
|
@@ -28,7 +28,7 @@ module Fluent
|
|
28
28
|
tag = chunk.metadata.tag
|
29
29
|
chunk.each do |time, record|
|
30
30
|
begin
|
31
|
-
socket.
|
31
|
+
socket.puts @formatter.format(tag, time, record)
|
32
32
|
rescue
|
33
33
|
@sockets[socket_key(@transport.to_sym, @host, @port)] = nil
|
34
34
|
raise
|
@@ -49,21 +49,6 @@ class FormatterSyslogRFC5424Test < Test::Unit::TestCase
|
|
49
49
|
formatter_driver.instance.format(tag, time, record)
|
50
50
|
end
|
51
51
|
|
52
|
-
def test_format_with_message_size_and_new_line
|
53
|
-
formatter_driver = create_driver %(
|
54
|
-
@type syslog_rfc5424
|
55
|
-
rfc6587_message_size true
|
56
|
-
)
|
57
|
-
tag = "test-formatter"
|
58
|
-
time = Fluent::EventTime.new(0, 123456000)
|
59
|
-
record = {"log" => "test-log\n\n"}
|
60
|
-
|
61
|
-
formatted_message = "<14>1 1970-01-01T00:00:00.123456+00:00 - - - - - test-log"
|
62
|
-
message_size = formatted_message.length
|
63
|
-
assert_equal "#{message_size} #{formatted_message}",
|
64
|
-
formatter_driver.instance.format(tag, time, record)
|
65
|
-
end
|
66
|
-
|
67
52
|
def test_format_with_app_name
|
68
53
|
formatter_driver = create_driver %(
|
69
54
|
@type syslog_rfc5424
|
@@ -31,7 +31,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
31
31
|
)
|
32
32
|
|
33
33
|
socket = Minitest::Mock.new
|
34
|
-
mock(socket).
|
34
|
+
mock(socket).puts(@formatted_log)
|
35
35
|
stub(socket).close
|
36
36
|
|
37
37
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
@@ -51,14 +51,14 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
51
51
|
)
|
52
52
|
|
53
53
|
bad_socket = Minitest::Mock.new
|
54
|
-
mock(bad_socket).
|
54
|
+
mock(bad_socket).puts(@formatted_log) {
|
55
55
|
raise StandardError
|
56
56
|
}
|
57
57
|
stub(bad_socket).close
|
58
58
|
|
59
59
|
|
60
60
|
good_socket = Minitest::Mock.new
|
61
|
-
mock(good_socket).
|
61
|
+
mock(good_socket).puts(@formatted_log)
|
62
62
|
stub(good_socket).close
|
63
63
|
|
64
64
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
@@ -80,7 +80,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
80
80
|
)
|
81
81
|
|
82
82
|
socket = Minitest::Mock.new
|
83
|
-
mock(socket).
|
83
|
+
mock(socket).puts(@formatted_log)
|
84
84
|
stub(socket).close
|
85
85
|
|
86
86
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
@@ -102,7 +102,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
102
102
|
)
|
103
103
|
|
104
104
|
socket = Minitest::Mock.new
|
105
|
-
mock(socket).
|
105
|
+
mock(socket).puts(@formatted_log)
|
106
106
|
stub(socket).close
|
107
107
|
|
108
108
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
@@ -124,7 +124,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
124
124
|
)
|
125
125
|
|
126
126
|
socket = Minitest::Mock.new
|
127
|
-
mock(socket).
|
127
|
+
mock(socket).puts(@formatted_log)
|
128
128
|
stub(socket).close
|
129
129
|
|
130
130
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
@@ -144,7 +144,7 @@ class OutSyslogRFC5424Test < Test::Unit::TestCase
|
|
144
144
|
)
|
145
145
|
|
146
146
|
socket = Minitest::Mock.new
|
147
|
-
stub(socket).
|
147
|
+
stub(socket).puts(@formatted_log)
|
148
148
|
|
149
149
|
any_instance_of(Fluent::Plugin::OutSyslogRFC5424) do |fluent_plugin|
|
150
150
|
mock(fluent_plugin).socket_create(:tls, "example.com", 123, {:insecure=>false, :verify_fqdn=>true, :cert_paths=>nil}).returns(socket)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-syslog_rfc5424
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.1
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,9 +145,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- - "
|
148
|
+
- - ">="
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
150
|
+
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
153
|
rubygems_version: 2.6.13
|