syslogstash 3.0.0 → 3.0.1

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: 24900387c20afb629c78879987193840d830df0973b1a57131306ae01f47a0cf
4
- data.tar.gz: 2236f3b6bca37894f160688e0cc7432e4877f753548b6eea93fcc270df0eebfc
3
+ metadata.gz: edd5226a95758de105e45a323f57e7ba13d986280949a27cc56c480ce8ad7b60
4
+ data.tar.gz: 61956dc95485ff4840c0fdb395535ab0d0f32360432a42b465e601d766e0b9db
5
5
  SHA512:
6
- metadata.gz: e82d6d53e887428310b2c03e6e3d11f5f16f55b62485595f20650b4061c1e59469f9955a03b9c885a1d5f1d843c4687f1b0c8b87b844a8a3dd1892b1d067252d
7
- data.tar.gz: b9b16ddc853c60d08302af3eeb4965fdd1c2a29ea91f4ca695b6c30765e4c12bca5bf64de3645a094c39004af181f5db394bbd6f8978704b0c250d42c0286770
6
+ metadata.gz: a6d5d941eaafe7b6d786f6090a8a90eea0a6260d9109bb5ef6dc5e1c9f3c9686f7a154b08b94af3b2e11360e7d191ee1436071257bcb3bbe7c5f409ee4c90398
7
+ data.tar.gz: 0a5a3dec776187dce02e4d96d3cead80cdad851c2eae19a6eb1bed1b90ceb11eb0b607be450bb593270fa749250d685d71e0ebc46c6c837a9125c4fda9ab0fa6
@@ -69,7 +69,7 @@ class Syslogstash::SyslogReader
69
69
  attr_reader :config, :logger
70
70
 
71
71
  def process_message(msg)
72
- if msg =~ /^<(\d+)>(\w{3} [ 0-9]{2} [0-9:]{8}) (.*)$/
72
+ if msg =~ /\A<(\d+)>(\w{3} [ 0-9]{2} [0-9:]{8}) (.*)\z/m
73
73
  flags = $1.to_i
74
74
  timestamp = $2
75
75
  content = $3
@@ -77,13 +77,13 @@ class Syslogstash::SyslogReader
77
77
  # Lo! the many ways that syslog messages can be formatted
78
78
  hostname, program, pid, message = case content
79
79
  # the gold standard: hostname, program name with optional PID
80
- when /^([a-zA-Z0-9._-]*[^:]) (\S+?)(\[(\d+)\])?: (.*)$/
80
+ when /\A([a-zA-Z0-9._-]*[^:]) (\S+?)(\[(\d+)\])?: (.*)\z/m
81
81
  [$1, $2, $4, $5]
82
82
  # hostname, no program name
83
- when /^([a-zA-Z0-9._-]+) (\S+[^:] .*)$/
83
+ when /\A([a-zA-Z0-9._-]+) (\S+[^:] .*)\z/m
84
84
  [$1, nil, nil, $2]
85
85
  # program name, no hostname (yeah, you heard me, non-RFC compliant!)
86
- when /^(\S+?)(\[(\d+)\])?: (.*)$/
86
+ when /\A(\S+?)(\[(\d+)\])?: (.*)\z/m
87
87
  [nil, $1, $3, $4]
88
88
  else
89
89
  # I have NFI
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syslogstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer