logging 0.5.0 → 0.5.1

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.5.1 / 2007-11-18
2
+
3
+ * Fixed a bug on Windows when attempting to load the syslog library
4
+
1
5
  == 0.5.0 / 2007-11-18
2
6
 
3
7
  * Added the ability to log via the syslog daemon
data/README.txt CHANGED
@@ -57,7 +57,7 @@ the recommended way of accomplishing this.
57
57
  end
58
58
 
59
59
  def some_method
60
- @log.debug = "some method was called on #{self.inspect}"
60
+ @log.debug "some method was called on #{self.inspect}"
61
61
  end
62
62
  end
63
63
 
@@ -67,7 +67,7 @@ the recommended way of accomplishing this.
67
67
  end
68
68
 
69
69
  def another_method
70
- @log.debug = "another method was called on #{self.inspect}"
70
+ @log.debug "another method was called on #{self.inspect}"
71
71
  end
72
72
  end
73
73
 
@@ -1,7 +1,17 @@
1
- # $Id: syslog.rb 46 2007-10-31 14:39:01Z tim_pease $
1
+ # $Id: syslog.rb 50 2007-11-19 00:38:50Z tim_pease $
2
2
 
3
- require 'logging/appender'
4
- require 'syslog'
3
+ begin
4
+ require 'logging/appender'
5
+ require 'syslog'
6
+ HAVE_SYSLOG = true
7
+ rescue LoadError
8
+ HAVE_SYSLOG = false
9
+ end
10
+
11
+ # only load this class if we have the syslog library
12
+ # Windows does not have syslog
13
+ #
14
+ if HAVE_SYSLOG
5
15
 
6
16
  module Logging
7
17
  module Appenders
@@ -207,4 +217,6 @@ module Appenders
207
217
  end # module Appenders
208
218
  end # module Logging
209
219
 
220
+ end # HAVE_SYSLOG
221
+
210
222
  # EOF
data/lib/logging.rb CHANGED
@@ -1,4 +1,4 @@
1
- # $Id: logging.rb 47 2007-11-13 05:14:55Z tim_pease $
1
+ # $Id: logging.rb 50 2007-11-19 00:38:50Z tim_pease $
2
2
 
3
3
  require 'logging/repository'
4
4
 
@@ -22,7 +22,7 @@ require 'logging/config/yaml_configurator'
22
22
  #
23
23
  module Logging
24
24
 
25
- VERSION = '0.5.0' # :nodoc:
25
+ VERSION = '0.5.1' # :nodoc:
26
26
 
27
27
  LEVELS = {} # :nodoc:
28
28
  LNAMES = {} # :nodoc:
@@ -1,7 +1,9 @@
1
- # $Id: test_syslog.rb 46 2007-10-31 14:39:01Z tim_pease $
1
+ # $Id: test_syslog.rb 51 2007-11-19 00:40:03Z tim_pease $
2
2
 
3
3
  require 'test/setup.rb'
4
4
 
5
+ if HAVE_SYSLOG
6
+
5
7
  module TestLogging
6
8
  module TestAppenders
7
9
 
@@ -189,4 +191,6 @@ module TestAppenders
189
191
  end # module TestAppenders
190
192
  end # module TestLogging
191
193
 
194
+ end # HAVE_SYSLOG
195
+
192
196
  # EOF
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: logging
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
6
+ version: 0.5.1
7
7
  date: 2007-11-18 00:00:00 -07:00
8
8
  summary: A flexible and extendable logging library for Ruby
9
9
  require_paths: