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

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c2d387591fe9093d96dfbf685043fcab92c7ff8659fa4dd6a75d8007d609e3b
4
- data.tar.gz: 06c6404a5d30c3d5cce6bfee75b44d674dce1125703f878f85b0c6e83b9e0004
3
+ metadata.gz: 287edad13098ed291c057cf494827592b646ae9b8ca58c3b80edb428f4500740
4
+ data.tar.gz: 84889f89cedcfc4b030015d63295992c75534bd6efaea86e9a571780e5e85be4
5
5
  SHA512:
6
- metadata.gz: 7161bef620349319586ffa3698411032fb64d2198b02b2eed1269f846dc32b94b2e3b47510d128e773354eedfd7fa67083093e43d8fd04bc42d4760d45f6c262
7
- data.tar.gz: 48b55f6eae0c446d9663c7af7ff827c70e1d04c461af28ede88889c6e8bd516caa08a3bc6f7b8f89e08ad98df0c4b42111e818d5b99e3a569d51f911d7f38a8c
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.16'
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,17 +181,7 @@ module SyslogTls
210
181
  else
211
182
  raise "Unknown select type #{type}"
212
183
  end
213
- begin
214
- result = 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
- # Code that may raise exceptions
218
- rescue => e
219
- # Catch all exceptions and log for testing/debugging
220
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
221
- puts "[#{timestamp}] Caught exception: #{e.class} - #{e.message}"
222
- puts e.backtrace.join("\n")
223
- end
184
+ IO.select(*args) || raise("Socket timeout during #{type}")
224
185
  end
225
186
 
226
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.16
4
+ version: 2.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan