lib/logging.rb in logging-0.5.3 vs lib/logging.rb in logging-0.6.0

- old
+ new

@@ -1,11 +1,13 @@ -# $Id: logging.rb 58 2007-12-05 20:32:54Z tim_pease $ +# $Id: logging.rb 65 2007-12-23 04:48:55Z tim_pease $ +require 'logging/utils' require 'logging/repository' # require all appenders require 'logging/appenders/console' +require 'logging/appenders/email' require 'logging/appenders/file' require 'logging/appenders/growl' require 'logging/appenders/rolling_file' require 'logging/appenders/static_appender' require 'logging/appenders/syslog' @@ -20,11 +22,11 @@ # # module Logging - VERSION = '0.5.3' # :nodoc: + VERSION = '0.6.0' # :nodoc: LEVELS = {} # :nodoc: LNAMES = {} # :nodoc: class << self @@ -239,24 +241,9 @@ l = levelify level case l when 'all'; 0 when 'off'; LEVELS.length else begin; Integer(l); rescue ArgumentError; LEVELS[l] end end - end - - # Helper method for retrieving options from a hash. - def options( opts = {} ) - lambda do |*args| - keys, default, ignored = args - catch(:opt) do - Array(keys).each do |key| - [key, key.to_s, key.to_s.intern].each do |k| - throw :opt, opts[k] if opts.has_key?(k) - end - end - default - end - end end # :startdoc: end end # module Logging