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

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: 287edad13098ed291c057cf494827592b646ae9b8ca58c3b80edb428f4500740
4
+ data.tar.gz: 84889f89cedcfc4b030015d63295992c75534bd6efaea86e9a571780e5e85be4
5
5
  SHA512:
6
- metadata.gz: 5705c08299cb346639e8bc622926430ee926489f2961981d2b31ad66af24d0789be0cb4c643cca8d15c17e40933f6764100ad14505962ee0044677ec920a3be4
7
- data.tar.gz: f2a6991661a142dc40ba0d95f29a5ab4281968b1b5ce8efb963e5f67311eedd72ec3bf8f41743853c7d30f5f128ef5d11bbee7e08da55851d7349ed30c1cc83f
6
+ metadata.gz: 32422e64ce1f4053f310bf57a4950831c8214dbd3b73c1cfd3199f93c2889da1dcbf3fcc688b9564509f95118ccf011f844ba973a07107979892a7df01b06d16
7
+ data.tar.gz: 00b1e2177e78009a05f682dbd668badc6c56cdbceee73346e7de3fe3c766838fa6d1804c5a02db5ed82b84d451c72342f327cb8da6158170513ff4218ae23533
@@ -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.18'
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,20 @@ 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
-
93
- select_with_timeout(tcp, :connect_write)
94
- begin
95
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
96
- puts "[#{timestamp}] in get_tcp_connection after select_with_timeout"
97
- tcp.connect_nonblock(sock_addr)
98
- rescue Errno::EISCONN
99
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
100
- puts "[#{timestamp}] in get_tcp_connection in EISCONN"
101
- # 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")}"
107
- tcp.close rescue nil
108
- raise
109
- 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")}"
75
+ # rescue Errno::EINPROGRESS
76
+ # tcp.close rescue nil
77
+ # raise
78
+ # select_with_timeout(tcp, :connect_write)
79
+ # begin
80
+ # tcp.connect_nonblock(sock_addr)
81
+ # rescue Errno::EISCONN
82
+ # # all good
83
+ # rescue SystemCallError
84
+ # tcp.close rescue nil
85
+ # raise
86
+ rescue Exception => e
87
+ # Log the exception
88
+ puts "Exception during TCP connection: #{e.message}"
115
89
  tcp.close rescue nil
116
90
  raise
117
91
  end
@@ -121,9 +95,6 @@ module SyslogTls
121
95
  end
122
96
 
123
97
  def get_ssl_connection
124
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
125
- puts "[#{timestamp}] in get_ssl_connection"
126
-
127
98
  tcp = get_tcp_connection
128
99
 
129
100
  ctx = OpenSSL::SSL::SSLContext.new
@@ -210,18 +181,7 @@ module SyslogTls
210
181
  else
211
182
  raise "Unknown select type #{type}"
212
183
  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
184
+ IO.select(*args) || raise("Socket timeout during #{type}")
225
185
  end
226
186
 
227
187
  # 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.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan