fluent-plugin-remote_syslog_tcp 0.3.9.6 → 0.3.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_remote_syslog_tcp.rb +8 -5
- 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: 24507a2eb1deffc9b3a23f2ad8f02500c33c8d9b
|
4
|
+
data.tar.gz: bb17cca7da6f4a55632b160e3d5f6eea68e16dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98fcbe8e7a12cae8a3101df432213d8f58a5165417658515e0ba1b8871ac4d49ae4e8ccecd26f7cb705870f03a96bfff24e3cd920df99843af040fba9ff99368
|
7
|
+
data.tar.gz: c51096900ace6809596f55cecbccd9d7b1d8d5c604f8be1dfa017ffc8cc0f1bc31234fff3c8576d84d47eeffba8ae65fa7d31f60ea6e8cf4fbad6aa64f779c63
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.9.
|
1
|
+
0.3.9.7
|
@@ -34,20 +34,23 @@ module Fluent
|
|
34
34
|
|
35
35
|
def emit(tag, es, chain)
|
36
36
|
es.each do |time, record|
|
37
|
+
new_record = {}
|
37
38
|
record.each_pair do |k, v|
|
38
|
-
if
|
39
|
-
v.
|
39
|
+
if k == 'msec'
|
40
|
+
new_record["timestamp"] = "#{time.to_s}.#{v}".to_f
|
41
|
+
elsif v.is_a?(String)
|
42
|
+
new_record[k] = v.force_encoding("utf-8")
|
40
43
|
end
|
41
44
|
end
|
42
45
|
|
43
46
|
tag = rewrite_tag!(tag.dup)
|
44
47
|
@loggers[tag] ||= RemoteSyslogLoggerCustom::TcpSender.new(@host,
|
45
48
|
@port,
|
46
|
-
facility:
|
47
|
-
severity:
|
49
|
+
facility: new_record['facility'] || @facility,
|
50
|
+
severity: new_record["severity"] || @severity,
|
48
51
|
program: tag,
|
49
52
|
local_hostname: Socket.gethostname)
|
50
|
-
@loggers[tag].transmit format(tag, time,
|
53
|
+
@loggers[tag].transmit format(tag, time, new_record)
|
51
54
|
end
|
52
55
|
chain.next
|
53
56
|
end
|