log2sock 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +9 -1
- data/lib/log2sock.rb +3 -3
- data/log2sock.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
log2sock allows you to send logs to a UNIX domain socket. Its usage is similar to the Ruby 'logger' class, except with slightly less features.
|
4
4
|
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
`gem install log2sock`
|
8
|
+
|
5
9
|
## Reading logs on a socket
|
6
10
|
|
7
11
|
A small tool is included in this gem to help you read log messages on a UNIX domain socket.
|
@@ -45,4 +49,8 @@ logger.debug { "This is something really stupid #{5/0}" } # lulz
|
|
45
49
|
|
46
50
|
## Requirements
|
47
51
|
|
48
|
-
* Ruby 1.9.x or greater
|
52
|
+
* Ruby 1.9.x or greater
|
53
|
+
|
54
|
+
## LICENSE
|
55
|
+
|
56
|
+
MIT License, see the LICENSE file
|
data/lib/log2sock.rb
CHANGED
@@ -39,7 +39,7 @@ class Log2sock
|
|
39
39
|
begin
|
40
40
|
@socketfile = log2sockfile
|
41
41
|
@socket = UNIXSocket.open(@socketfile)
|
42
|
-
rescue
|
42
|
+
rescue SystemCallError => e
|
43
43
|
set_socket_stdout(e)
|
44
44
|
end
|
45
45
|
end
|
@@ -78,8 +78,8 @@ class Log2sock
|
|
78
78
|
|
79
79
|
begin
|
80
80
|
@socket.puts "#{prefix} #{message}"
|
81
|
-
rescue
|
82
|
-
# If the socket generates
|
81
|
+
rescue SystemCallError => e
|
82
|
+
# If the socket generates an exception, set the output
|
83
83
|
# to STDOUT for future calls to message()
|
84
84
|
set_socket_stdout(e)
|
85
85
|
@socket.puts "#{prefix} #{message}"
|
data/log2sock.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log2sock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: log2sock allows you to send logs to a UNIX domain socket. Its usage is
|
15
15
|
similar to the Ruby 'logger' class, except with slightly less features.
|