fluent-plugin-syslog-gobi-tls 2.1.17 → 2.1.19

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
  SHA256:
3
- metadata.gz: 379befcfa8fb6306a7386fe9760a76c3607c136deb9c7da0bfcb801a42ec180a
4
- data.tar.gz: b4ab7597f4ff3ed57656c49c358f6da353e5905934da15a149143093e56e50d2
3
+ metadata.gz: 0bda2811fafdce903eeac4e53e1599a70a0dd5375fc19ee7b4f502b9c1cd6da4
4
+ data.tar.gz: ea2ac79dd3ca500d87c1d7291792325b29d76ba893ec9470169e60dc7bc1886a
5
5
  SHA512:
6
- metadata.gz: 5705c08299cb346639e8bc622926430ee926489f2961981d2b31ad66af24d0789be0cb4c643cca8d15c17e40933f6764100ad14505962ee0044677ec920a3be4
7
- data.tar.gz: f2a6991661a142dc40ba0d95f29a5ab4281968b1b5ce8efb963e5f67311eedd72ec3bf8f41743853c7d30f5f128ef5d11bbee7e08da55851d7349ed30c1cc83f
6
+ metadata.gz: 8ca33e20d225e859ad49b15ee160092b2af4fc83259b7117699a9e59ff8fb3a2e755f499844fff8b4344f3ea969b6375ad935bd516fed05141a809724c7656c3
7
+ data.tar.gz: 2ae02d4cb3dc87a3815a0efe5e59c54bc8a9c91c3ee24a6daf6d7014c7b1abf5a1cbc5a04d2c340d1d982d143966698832026841166659f148882b80db132e1c
@@ -19,7 +19,7 @@ require 'syslog_tls/version'
19
19
 
20
20
  Gem::Specification.new do |s|
21
21
  s.name = 'fluent-plugin-syslog-gobi-tls'
22
- s.version = '2.1.17'
22
+ s.version = '2.1.19'
23
23
  s.summary = %q{Fluent Syslog TLS output plugin}
24
24
  s.authors = ['thomas morgan']
25
25
  s.email = ['tm@iprog.com']
@@ -39,27 +39,17 @@ module SyslogTls
39
39
  @verify_cert_name = verify_cert_name
40
40
  @ssl_version = ssl_version
41
41
  @retries = max_retries
42
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
43
- puts "[#{timestamp}] in initialize: #{idle_timeout}"
44
42
  connect
45
43
  end
46
44
 
47
45
  def connect
48
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
49
- puts "[#{timestamp}] in connect"
50
46
  @socket = get_ssl_connection
51
47
  begin
52
48
  begin
53
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
54
- puts "[#{timestamp}] in connect doing connect_nonblock"
55
49
  @socket.connect_nonblock
56
- rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable => e
57
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
58
- puts "[#{timestamp}] in connect EAGAIN rescue: #{e.class} exception #{e.message} "
50
+ rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
59
51
  select_with_timeout(@socket, :connect_read) && retry
60
- rescue IO::WaitWritable => e
61
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
62
- puts "[#{timestamp}] in connect WaitWritable rescue: #{e.class} exception #{e.message} "
52
+ rescue IO::WaitWritable
63
53
  select_with_timeout(@socket, :connect_write) && retry
64
54
  end
65
55
  rescue Errno::ETIMEDOUT
@@ -69,8 +59,6 @@ module SyslogTls
69
59
  end
70
60
 
71
61
  def get_tcp_connection
72
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
73
- puts "[#{timestamp}] in get_tcp_connection"
74
62
  tcp = nil
75
63
 
76
64
  family = Socket::Constants::AF_UNSPEC
@@ -84,34 +72,17 @@ module SyslogTls
84
72
  tcp.setsockopt(Socket::SOL_SOCKET, Socket::Constants::SO_REUSEADDR, true)
85
73
  tcp.setsockopt(Socket::SOL_SOCKET, Socket::Constants::SO_REUSEPORT, true)
86
74
  tcp.connect_nonblock(sock_addr)
87
- rescue Errno::EINPROGRESS => e
88
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
89
- puts "[#{timestamp}] in get_tcp_connection EINPROGRESS exception during TCP connection:"
90
- puts "[#{timestamp}] Message: #{e.message}"
91
- puts "[#{timestamp}] Backtrace: #{e.backtrace.join("\n")}"
92
-
75
+ rescue Errno::EINPROGRESS
93
76
  select_with_timeout(tcp, :connect_write)
94
77
  begin
95
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
96
- puts "[#{timestamp}] in get_tcp_connection after select_with_timeout"
97
78
  tcp.connect_nonblock(sock_addr)
98
79
  rescue Errno::EISCONN
99
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
100
- puts "[#{timestamp}] in get_tcp_connection in EISCONN"
101
80
  # all good
102
- rescue SystemCallError => e
103
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
104
- puts "[#{timestamp}] in get_tcp_connection SystemCallError exception during TCP connection:"
105
- puts "[#{timestamp}] Message: #{e.message}"
106
- puts "[#{timestamp}] Backtrace: #{e.backtrace.join("\n")}"
81
+ rescue SystemCallError
107
82
  tcp.close rescue nil
108
83
  raise
109
84
  end
110
- rescue SystemCallError => e
111
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
112
- puts "[#{timestamp}] in get_tcp_connection SystemCallError outer exception during TCP connection:"
113
- puts "[#{timestamp}] Message: #{e.message}"
114
- puts "[#{timestamp}] Backtrace: #{e.backtrace.join("\n")}"
85
+ rescue SystemCallError
115
86
  tcp.close rescue nil
116
87
  raise
117
88
  end
@@ -121,9 +92,6 @@ module SyslogTls
121
92
  end
122
93
 
123
94
  def get_ssl_connection
124
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
125
- puts "[#{timestamp}] in get_ssl_connection"
126
-
127
95
  tcp = get_tcp_connection
128
96
 
129
97
  ctx = OpenSSL::SSL::SSLContext.new
@@ -210,18 +178,7 @@ module SyslogTls
210
178
  else
211
179
  raise "Unknown select type #{type}"
212
180
  end
213
- begin
214
- IO.select(*args) || raise("Socket timeout during #{type}")
215
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
216
- # puts "[#{timestamp}] in select_with_timeout: IO.select result during #{type}: #{result.inspect}"
217
- puts "[#{timestamp}] in select_with_timeout: IO.select result during"
218
- # Code that may raise exceptions
219
- rescue => e
220
- # Catch all exceptions and log for testing/debugging
221
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
222
- puts "[#{timestamp}] Caught exception: #{e.class} - #{e.message}"
223
- puts e.backtrace.join("\n")
224
- end
181
+ IO.select(*args) || raise("Socket timeout during #{type}")
225
182
  end
226
183
 
227
184
  # Forward any methods directly to SSLSocket
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-syslog-gobi-tls
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.17
4
+ version: 2.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan