loganb-scribble-client 0.0.2 → 0.0.3

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/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
@@ -6,5 +6,5 @@ Dir["#{File.dirname(__FILE__)}/scribble-client/**/*.rb"].sort.each { |lib|
6
6
  }
7
7
 
8
8
  module ScribbleClient
9
- VERSION = '0.0.2'
10
- end
9
+ VERSION = '0.0.3'
10
+ end
@@ -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
- @socket.send(buf,0)
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{scribble-client}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Logan Bowers"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loganb-scribble-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Bowers