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 +4 -0
- data/README.txt +2 -2
- data/lib/logging/appenders/syslog.rb +15 -3
- data/lib/logging.rb +2 -2
- data/test/appenders/test_syslog.rb +5 -1
- metadata +1 -1
data/History.txt
CHANGED
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
|
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
|
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
|
1
|
+
# $Id: syslog.rb 50 2007-11-19 00:38:50Z tim_pease $
|
2
2
|
|
3
|
-
|
4
|
-
require '
|
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
|
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.
|
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
|
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