syslogstash 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/syslogstash/syslog_reader.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d3e431ae7c66eafbe07686b87f012d63bc563e1
|
4
|
+
data.tar.gz: 29156c243ffbc6c4b84aaa92105f2db286c239ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51a912d37ea4eb14891eb6256bc6d0465e0eab7afd53e057951fc83cedcc8be39b35b22c1f97492cae32ad5f320d36a89c8ae9017faa4abacdfcf2c83a412aa0
|
7
|
+
data.tar.gz: a3d81b2f2195f005f2665fb470f644f38360713ce51f8ac163c0f826d5d598d39539643e6df919dcef575f0b28298afcb89e00a784d309ab0d31a4ee77741390
|
@@ -16,13 +16,17 @@ class Syslogstash::SyslogReader
|
|
16
16
|
def run
|
17
17
|
debug { "#run called" }
|
18
18
|
|
19
|
-
|
19
|
+
begin
|
20
|
+
socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM, 0)
|
21
|
+
socket.bind(Socket.pack_sockaddr_un(@file))
|
22
|
+
rescue Errno::EEXIST
|
20
23
|
File.unlink(@file)
|
24
|
+
retry
|
25
|
+
rescue SystemCallError
|
26
|
+
$stderr.puts "Error while trying to bind to #{@file}"
|
27
|
+
raise
|
21
28
|
end
|
22
29
|
|
23
|
-
socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM, 0)
|
24
|
-
socket.bind(Socket.pack_sockaddr_un(@file))
|
25
|
-
|
26
30
|
@worker = Thread.new do
|
27
31
|
begin
|
28
32
|
loop do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: syslogstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|