loganb-scribble-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/scribble-client.rb +2 -2
- data/lib/scribble-client/syslog_client.rb +8 -1
- data/scribble-client.gemspec +1 -1
- metadata +1 -1
data/History.txt
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.0.3 2009-05-28
|
2
|
+
|
3
|
+
* Fixed an issue were SyslogClient barfs if no one is listening on the other end
|
4
|
+
|
1
5
|
== 0.0.2 2009-05-28
|
2
6
|
|
3
7
|
* Changed the structure of contexts, they are now named and contain only one hash. A named context may be applied for the duration of a block
|
data/lib/scribble-client.rb
CHANGED
@@ -11,6 +11,8 @@ class SyslogClient
|
|
11
11
|
@socket.connect(host,port)
|
12
12
|
#Allow for really big log lines
|
13
13
|
@socket.setsockopt(Socket::SOL_SOCKET,Socket::SO_SNDBUF,24000)
|
14
|
+
|
15
|
+
@error_count = 0
|
14
16
|
end
|
15
17
|
|
16
18
|
def syslog(facility,priority,message)
|
@@ -20,7 +22,12 @@ class SyslogClient
|
|
20
22
|
tim = Time.now.strftime("%b %d %H:%M:%S")
|
21
23
|
#tim = Time.now.xmlschema
|
22
24
|
buf = "<#{fpnum}>#{tim} #{host} thetag #{message}"
|
23
|
-
|
25
|
+
begin
|
26
|
+
@socket.send(buf,0)
|
27
|
+
rescue Exception => e
|
28
|
+
@error_count += 1
|
29
|
+
@last_error = e
|
30
|
+
end
|
24
31
|
end
|
25
32
|
|
26
33
|
end
|
data/scribble-client.gemspec
CHANGED