remote_syslog_sender_multiline 1.2.3 → 1.2.4

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: e9777f1322a50875dd02a9b00eba90e3c63fc0f8
4
- data.tar.gz: 6b9b004ee9f3e0656621654fc54686ecdae3d8d6
3
+ metadata.gz: 46ed7358029ab748ac36bf22bf46052d6ee7ac62
4
+ data.tar.gz: d0a37860675be8526bc2265112708a5edeb51b35
5
5
  SHA512:
6
- metadata.gz: '096877405cfce2d3ca26055a92667f3c3fc40e231972fe21340db5ab7c1dda31411570b69c6c265fc99e8b683ae1d711b0e71a6dd81abc7e5eae40841818081f'
7
- data.tar.gz: 6aa535b729ee9435931084e8d1c020a2e0be9bfd32c704c32692fe02486a1be867494e9e5310a93f4c0895be5197c4acea7e3c1edd1c8281c63db290e9fa75b3
6
+ metadata.gz: 50fc9f40a73352544956e6d5509f230d256437c4a18f937ad71a4d10109803f2bf89ac4adc049392157dcb56de31eb4f9ad993a631d9ca0cd2f0082f64803335
7
+ data.tar.gz: 682e2723c44474fb9ccc5e4442143342c93fd89ce9095fcb3d2ac6d0ed124d93ee1a09fe57588496d02a17df73d1429ee606c024626f6d693ccdddcc6868bfd6
@@ -34,26 +34,23 @@ module RemoteSyslogSender
34
34
  end
35
35
 
36
36
  def transmit(message, packet_options = nil)
37
- message.split(//).each do |line|
38
- begin
39
- next if line =~ /^\s*$/
40
- packet = @packet.dup
41
- if packet_options
42
- packet.tag = packet_options[:program] if packet_options[:program]
43
- packet.hostname = packet_options[:local_hostname] if packet_options[:local_hostname]
44
- %i(hostname facility severity tag).each do |key|
45
- packet.send("#{key}=", packet_options[key]) if packet_options[key]
46
- end
47
- end
48
- packet.content = line
49
- send_msg(packet.assemble(@packet_size))
50
- rescue
51
- if @whinyerrors
52
- raise
53
- else
54
- $stderr.puts "#{self.class} error: #{$!.class}: #{$!}\nOriginal message: #{line}"
37
+ begin
38
+ packet = @packet.dup
39
+ if packet_options
40
+ packet.tag = packet_options[:program] if packet_options[:program]
41
+ packet.hostname = packet_options[:local_hostname] if packet_options[:local_hostname]
42
+ %i(hostname facility severity tag).each do |key|
43
+ packet.send("#{key}=", packet_options[key]) if packet_options[key]
55
44
  end
56
45
  end
46
+ packet.content = message
47
+ send_msg(packet.assemble(@packet_size))
48
+ rescue
49
+ if @whinyerrors
50
+ raise
51
+ else
52
+ $stderr.puts "#{self.class} error: #{$!.class}: #{$!}\nOriginal message: #{message}"
53
+ end
57
54
  end
58
55
  end
59
56
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'remote_syslog_sender_multiline'
3
- s.version = '1.2.3'
3
+ s.version = '1.2.4'
4
4
  s.summary = "Message sender that sends directly to a remote syslog endpoint"
5
5
  s.description = "Message sender that sends directly to a remote syslog endpoint (Support UDP, TCP, TCP+TLS)"
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_syslog_sender_multiline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lawrence Li