public
Description: A flexible logging library for use in Ruby programs based on the design of Java's log4j library.
Homepage: http://logging.rubyforge.org/
Clone URL: git://github.com/TwP/logging.git
Adding tests for the DSL configurator.
TwP (author)
Wed Jul 16 18:06:51 -0700 2008
commit  6c66ea5d3c77a9a88cfdfc9e179bcd2b41087866
tree    58a00b64e65e313e50825facc9cef67c54812afc
parent  000c1bfcc2c7d6ea9b6cd72906ac6dbe3d607016
...
234
235
236
237
 
238
239
240
...
242
243
244
245
 
246
247
248
...
234
235
236
 
237
238
239
240
...
242
243
244
 
245
246
247
248
0
@@ -234,7 +234,7 @@ module Logging
0
     # <tt>File.join</tt>.
0
     #
0
     def libpath( *args )
0
- args.empty? ? LIBPATH : ::File.join(LIBPATH, *args)
0
+ args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
0
     end
0
 
0
     # Returns the lpath for the module. If any arguments are given,
0
@@ -242,7 +242,7 @@ module Logging
0
     # <tt>File.join</tt>.
0
     #
0
     def path( *args )
0
- args.empty? ? PATH : ::File.join(PATH, *args)
0
+ args.empty? ? PATH : ::File.join(PATH, args.flatten)
0
     end
0
 
0
     # Utility method used to rquire all files ending in .rb that lie in the
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require 'thread'
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require Logging.libpath(*%w[logging appenders io])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require 'net/smtp'
0
 require 'time' # get rfc822 time format
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging::Appenders
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging::Appenders
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging::Appenders
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require 'lockfile'
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 begin
0
   require 'syslog'
...
94
95
96
97
 
98
99
100
...
149
150
151
152
 
153
154
155
...
166
167
168
169
 
170
171
172
...
94
95
96
 
97
98
99
100
...
149
150
151
 
152
153
154
155
...
166
167
168
 
169
170
171
172
0
@@ -94,7 +94,7 @@ module Logging::Config
0
     #
0
     def pre_config( config )
0
       if config.nil?
0
- ::Logging.init unless defined?(::Logging::MAX_LEVEL_LENGTH)
0
+ ::Logging.init unless ::Logging.const_defined? 'MAX_LEVEL_LENGTH'
0
         return
0
       end
0
 
0
@@ -149,7 +149,7 @@ module Logging::Config
0
       type = config.delete(:type)
0
       raise Error, "appender type not given for #{name.inspect}" if type.nil?
0
 
0
- config[:layout] = layout(config.delete(:layout))
0
+ config[:layout] = layout(config[:layout]) if config.has_key? :layout
0
 
0
       clazz = ::Logging::Appenders.const_get type
0
       clazz.new(name, config)
0
@@ -166,7 +166,7 @@ module Logging::Config
0
     # initializer.
0
     #
0
     def layout( config )
0
- return if config.nil?
0
+ return ::Logging::Layouts::Basic.new if config.nil?
0
 
0
       type = config.delete(:type)
0
       raise Error, 'layout type not given' if type.nil?
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
  
0
 require 'yaml'
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging
0
 module Layouts
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging
0
 module Layouts
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 module Logging
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 class Hash
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 require 'flexmock'
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 require 'flexmock'
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 begin
0
   require 'logging'
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[.. setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 # Equivalent to a header guard in C/C++
0
 # Used to prevent the class/module from being loaded more than once
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 
...
1
2
3
4
...
 
1
2
3
0
@@ -1,4 +1,3 @@
0
-# $Id$
0
 
0
 require File.join(File.dirname(__FILE__), %w[setup])
0
 

Comments

    No one has commented yet.