remote_syslog_sender_multiline 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/remote_syslog_sender_multiline/sender.rb +15 -18
- data/remote_syslog_sender_multiline.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ed7358029ab748ac36bf22bf46052d6ee7ac62
|
4
|
+
data.tar.gz: d0a37860675be8526bc2265112708a5edeb51b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
38
|
-
|
39
|
-
|
40
|
-
packet =
|
41
|
-
if packet_options
|
42
|
-
|
43
|
-
packet.
|
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
|
+
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
|
|