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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 768b29e3af06bffeedf27a11a3e2d8a8b0c6f399
4
- data.tar.gz: 6dd914d1452972d6b2a7972725a78fea093fd2d3
3
+ metadata.gz: 24507a2eb1deffc9b3a23f2ad8f02500c33c8d9b
4
+ data.tar.gz: bb17cca7da6f4a55632b160e3d5f6eea68e16dfc
5
5
  SHA512:
6
- metadata.gz: 77db6342fc95c37828eab7c73ce5283aebcc67140be810d5daf75b824c760968fa4cbda50259e14e96bdb99501de15f12db79ae3730987723abc33abec786497
7
- data.tar.gz: ce78682ebfe0248bc1d0bd8023e625feb4d9443c6fd5355531d7b65d9246b6c68d5dc7b7f724b9d57e7cd840eda0c64fa195fde582648dcfc3c2e2ee39f614f1
6
+ metadata.gz: 98fcbe8e7a12cae8a3101df432213d8f58a5165417658515e0ba1b8871ac4d49ae4e8ccecd26f7cb705870f03a96bfff24e3cd920df99843af040fba9ff99368
7
+ data.tar.gz: c51096900ace6809596f55cecbccd9d7b1d8d5c604f8be1dfa017ffc8cc0f1bc31234fff3c8576d84d47eeffba8ae65fa7d31f60ea6e8cf4fbad6aa64f779c63
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.9.6
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 v.is_a?(String)
39
- v.force_encoding("utf-8")
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: record.inspect,
47
- severity: record["severity"] || @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, record)
53
+ @loggers[tag].transmit format(tag, time, new_record)
51
54
  end
52
55
  chain.next
53
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-remote_syslog_tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9.6
4
+ version: 0.3.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Lee