fluent-plugin-syslog-gobi-tls 2.1.27 → 2.1.28

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: 05dba789739e7d17d93ec0b6834f44f483c81110c0b7a3049b05d4363f4887c6
4
- data.tar.gz: bebec7c5ce38b10f59703fb198a36cbcfe9f288f56185ad1731c917ddcc02be6
3
+ metadata.gz: 7588960a6c14e25d874b1621b23ccddeec6a68f7bdb6865190d27458d9ba8bb4
4
+ data.tar.gz: c1c8dcb3ea00c5d36251c82551f8a5edc2ee2d01429c05ac9d0a8dab349c808b
5
5
  SHA512:
6
- metadata.gz: 0271e8be2d6a57ae2ebea8f4141a7c621e07840e06c884317f6fb0d5a04d53d8f9f80aa61672c254d14861f2967e5e27a4fb2c6d68da589f895e3950c8cf27a8
7
- data.tar.gz: e3d831b0a3cdeffce687482a6bc8b22ed6882c69404b7b808d785439b214ce459f0b87712f192276c5838fa938973ea894e26cec0b8c54fdac622c180288f973
6
+ metadata.gz: b9bc4d9ffc76e3c518069991b88c6010448b1d1e50573e0c2fa1ed6dd96b29b999eb29c29641f0470c6fd5e2a9e518b4e482acdcbc801c09b39b1d6a940fafbb
7
+ data.tar.gz: 1872801c5822904d6ae2c94ba9e86941deece593fd49e74608bef484606a2730eb27e96c40c30f2dba2ef2ea8487230276775b1dea2892787d3b2cd56564feaf
@@ -19,10 +19,10 @@ 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.27'
23
- s.summary = %q{Fluent Syslog TLS output plugin}
22
+ s.version = '2.1.28'
24
23
  s.authors = ['thomas morgan']
25
24
  s.email = ['tm@iprog.com']
25
+ s.summary = %q{Fluent Syslog TLS output plugin}
26
26
  s.description = %q{Syslog TLS output plugin with formatting support, for Fluentd}
27
27
  s.homepage = 'https://github.com/zarqman/fluent-plugin-syslog-tls'
28
28
  s.license = 'Apache v2'
@@ -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,54 +59,30 @@ 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
77
65
  sock_type = Socket::Constants::SOCK_STREAM
78
66
  addr_info = Socket.getaddrinfo(host, port, family, sock_type, nil, nil, false).first
79
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
80
- puts "[#{timestamp}] in get_tcp_connection addr_info: #{addr_info}"
81
67
  _, port, _, address, family, sock_type = addr_info
82
68
 
83
69
  begin
84
70
  sock_addr = Socket.sockaddr_in(port, address)
85
71
  tcp = Socket.new(family, sock_type, 0)
86
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
87
- puts "[#{timestamp}] in get_tcp_connection tcp: #{tcp}"
88
72
  tcp.setsockopt(Socket::SOL_SOCKET, Socket::Constants::SO_REUSEADDR, true)
89
73
  tcp.setsockopt(Socket::SOL_SOCKET, Socket::Constants::SO_REUSEPORT, true)
90
74
  tcp.connect_nonblock(sock_addr)
91
- rescue Errno::ECONNREFUSED => e
92
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
93
- puts "[#{timestamp}] in get_tcp_connection ECONNREFUSED exception during TCP connection:"
94
- tcp.close rescue nil
95
- raise
96
- rescue Errno::EINPROGRESS => e
97
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
98
- puts "[#{timestamp}] in get_tcp_connection EINPROGRESS exception during TCP connection:"
99
- puts "[#{timestamp}] Message: #{e.message}"
75
+ rescue Errno::EINPROGRESS
100
76
  select_with_timeout(tcp, :connect_write)
101
77
  begin
102
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
103
- puts "[#{timestamp}] in get_tcp_connection after select_with_timeout"
104
78
  tcp.connect_nonblock(sock_addr)
105
79
  rescue Errno::EISCONN
106
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
107
- puts "[#{timestamp}] in get_tcp_connection in EISCONN"
108
80
  # all good
109
- rescue SystemCallError => e
110
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
111
- puts "[#{timestamp}] in get_tcp_connection SystemCallError exception during TCP connection:"
112
- puts "[#{timestamp}] Message: #{e.message}"
81
+ rescue SystemCallError
113
82
  tcp.close rescue nil
114
83
  raise
115
84
  end
116
- rescue SystemCallError => e
117
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
118
- puts "[#{timestamp}] in get_tcp_connection SystemCallError outer exception during TCP connection:"
119
- puts "[#{timestamp}] Message: #{e.message}"
85
+ rescue SystemCallError
120
86
  tcp.close rescue nil
121
87
  raise
122
88
  end
@@ -126,8 +92,6 @@ module SyslogTls
126
92
  end
127
93
 
128
94
  def get_ssl_connection
129
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
130
- puts "[#{timestamp}] in get_ssl_connection"
131
95
  tcp = get_tcp_connection
132
96
 
133
97
  ctx = OpenSSL::SSL::SSLContext.new
@@ -214,15 +178,7 @@ module SyslogTls
214
178
  else
215
179
  raise "Unknown select type #{type}"
216
180
  end
217
- # IO.select(*args) || raise("Socket timeout during #{type}")
218
- begin
219
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
220
- select1 = IO.select(*args)
221
- puts "[#{timestamp}] in select_with_timeout: #{select1}"
222
- rescue IOError => e
223
- timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
224
- puts "[#{timestamp}] Error in select_with_timeout: #{e.message}"
225
- end
181
+ IO.select(*args) || raise("Socket timeout during #{type}")
226
182
  end
227
183
 
228
184
  # Forward any methods directly to SSLSocket
metadata CHANGED
@@ -1,14 +1,14 @@
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.27
4
+ version: 2.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-11 00:00:00.000000000 Z
11
+ date: 2024-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubygems_version: 3.2.3
168
+ rubygems_version: 3.1.2
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Fluent Syslog TLS output plugin