<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,8 @@
 === 0.0.2 / 2009-10-28
 
-* Added multi-parser utility
-* Fixed several bugs involving parsing and formatting
+* Added multi-parser utility.
+* Fixed several bugs involving parsing and formatting.
+* Logger uses activesupport's SecureRandom on Ruby 1.8 if available.
 
 === 0.0.1 / 2009-10-28
 </diff>
      <filename>History.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -80,7 +80,7 @@ gemspec_ = ::Gem::Specification.new do |s_|
   s_.author = 'Daniel Azuma'
   s_.email = 'dazuma@gmail.com'
   s_.description = 'Sawmill is a logging and log analysis system for Ruby. It extends the basic Ruby logging facility with log records and parsing abilities.'
-  s_.homepage = 'http://github.com/dazuma/sawmill'
+  s_.homepage = 'http://virtuoso.rubyforge.org/sawmill'
   s_.rubyforge_project = 'virtuoso'
   s_.required_ruby_version = '&gt;= 1.8.6'
   s_.files = ::FileList['lib/**/*.rb', 'tests/**/*.rb', '*.rdoc', 'Rakefile'].to_a
@@ -88,8 +88,8 @@ gemspec_ = ::Gem::Specification.new do |s_|
   s_.has_rdoc = true
   s_.test_files = ::FileList['tests/tc_*.rb']
   s_.platform = ::Gem::Platform::RUBY
-  s_.add_dependency('blockenspiel', '&gt;= 0.2.1')
-  s_.add_dependency('versionomy', '&gt;= 0.1.1')
+  s_.add_dependency('blockenspiel', '&gt;= 0.2.2')
+  s_.add_dependency('versionomy', '&gt;= 0.1.2')
 end
 ::Rake::GemPackageTask.new(gemspec_) do |task_|
   task_.need_zip = false</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -130,12 +130,12 @@ module Sawmill
       
       def _interpret_processor(param_)  # :nodoc:
         case param_
-        when Class
+        when ::Class
           param_.new
         when Base
           param_
         else
-          raise ArgumentError, &quot;Unknown processor object of type #{param_.class.name}&quot;
+          raise ::ArgumentError, &quot;Unknown processor object of type #{param_.class.name}&quot;
         end
       end
       </diff>
      <filename>lib/sawmill/entry_processor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,7 +119,7 @@ module Sawmill
       def _check_filter(entry_)  # :nodoc:
         if @level
           level_ = entry_.level
-          if @level.kind_of?(::Sawmill::Level)
+          if @level.kind_of?(Level)
             check_level_ = @level
             if level_.group != check_level_.group
               return false unless @accept_incomparable_levels</diff>
      <filename>lib/sawmill/entry_processor/filter_basic_fields.rb</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,7 @@ module Sawmill
         elsif destination_.respond_to?(:close) &amp;&amp; destination_.respond_to?(:write)
           @io = destination_
         else
-          raise ArgumentError, &quot;Unknown destination type&quot;
+          raise ::ArgumentError, &quot;Unknown destination type&quot;
         end
         @include_id = opts_[:include_id]
         @fractional_second_digits = (opts_[:fractional_second_digits] || 2).to_i</diff>
      <filename>lib/sawmill/entry_processor/format.rb</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,7 @@ module Sawmill
     
     def initialize(app_, logger_=nil, opts_={})
       @app = app_
-      @logger = logger_ || Logger.new(:progname =&gt; 'rack', :processor =&gt; ::Sawmill::Formatter.new(STDOUT))
+      @logger = logger_ || Logger.new(:progname =&gt; 'rack', :processor =&gt; Formatter.new(::STDOUT))
       @request_id_key = opts_[:request_id_key] || 'sawmill.request_id'
       @start_time_attribute = opts_[:start_time_attribute]
       @end_time_attribute = opts_[:end_time_attribute]
@@ -72,14 +72,14 @@ module Sawmill
     def call(env_)
       env_[@request_id_key] = @logger.begin_record
       if @start_time_attribute
-        time_ = Time.now.utc
+        time_ = ::Time.now.utc
         @logger.set_attribute(@start_time_attribute, time_.strftime('%Y-%m-%dT%H:%M:%S.') + ('%06d' % time_.usec) + 'Z')
       end
       begin
         return @app.call(env_)
       ensure
         if @end_time_attribute
-          time_ = Time.now.utc
+          time_ = ::Time.now.utc
           @logger.set_attribute(@end_time_attribute, time_.strftime('%Y-%m-%dT%H:%M:%S.') + ('%06d' % time_.usec) + 'Z')
         end
         @logger.end_record</diff>
      <filename>lib/sawmill/log_record_middleware.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,8 +34,9 @@
 ;
 
 
-if RUBY_VERSION &gt;= '1.9'
+begin
   require 'securerandom'
+rescue ::LoadError
 end
 
 
@@ -80,7 +81,7 @@ module Sawmill
     #   If not specified, log entries are written out to STDOUT.
     
     def initialize(opts_={})
-      @levels = opts_[:levels] || ::Sawmill::STANDARD_LEVELS
+      @levels = opts_[:levels] || STANDARD_LEVELS
       @level = @levels.get(opts_[:level])
       if opts_.include?(:attribute_level)
         @attribute_level = @levels.get(opts_[:attribute_level])
@@ -89,8 +90,8 @@ module Sawmill
       end
       @progname = opts_[:progname] || 'sawmill'
       @record_progname = opts_[:record_progname] || @progname
-      @record_id_generator = opts_[:record_id_generator] || _get_default_record_id_generator
-      @processor = opts_[:processor] || ::Sawmill::Formatter.new(STDOUT)
+      @record_id_generator = opts_[:record_id_generator] || Logger._get_default_record_id_generator
+      @processor = opts_[:processor] || Formatter.new(::STDOUT)
       @current_record_id = nil
     end
     
@@ -122,7 +123,7 @@ module Sawmill
       else
         message_ = message_.inspect
       end
-      @processor.message(Entry::Message.new(level_obj_, Time.now, progname_, @current_record_id, message_))
+      @processor.message(Entry::Message.new(level_obj_, ::Time.now, progname_, @current_record_id, message_))
       true
     end
     alias_method :log, :add
@@ -161,7 +162,7 @@ module Sawmill
     def begin_record(id_=nil)
       end_record if @current_record_id
       @current_record_id = (id_ || @record_id_generator.call).to_s
-      @processor.begin_record(Entry::BeginRecord.new(@levels.highest, Time.now, @record_progname, @current_record_id))
+      @processor.begin_record(Entry::BeginRecord.new(@levels.highest, ::Time.now, @record_progname, @current_record_id))
       @current_record_id
     end
     
@@ -180,7 +181,7 @@ module Sawmill
     
     def end_record
       if @current_record_id
-        @processor.end_record(Entry::EndRecord.new(@levels.highest, Time.now, @record_progname, @current_record_id))
+        @processor.end_record(Entry::EndRecord.new(@levels.highest, ::Time.now, @record_progname, @current_record_id))
         id_ = @current_record_id
         @current_record_id = nil
         id_
@@ -209,7 +210,7 @@ module Sawmill
         end
       end
       return true if level_obj_ &lt; @level
-      @processor.attribute(Entry::Attribute.new(level_obj_, Time.now, progname_ || @record_progname, @current_record_id, key_, value_, operation_))
+      @processor.attribute(Entry::Attribute.new(level_obj_, ::Time.now, progname_ || @record_progname, @current_record_id, key_, value_, operation_))
       true
     end
     
@@ -288,7 +289,7 @@ module Sawmill
     # a default generator which uses the variant 4 (random) UUID standard.
     
     def to_generate_record_id(&amp;block_)
-      @record_id_generator = block_ || _get_default_record_id_generator
+      @record_id_generator = block_ || Logger._get_default_record_id_generator
     end
     
     
@@ -339,21 +340,23 @@ module Sawmill
     end
     
     
-    def _get_default_record_id_generator  # :nodoc:
-      if RUBY_VERSION &gt;= '1.9'
-        lambda do
-          uuid_ = SecureRandom.hex(32)
-          uuid_[12] = '4'
-          uuid_[16] = (uuid_[16,1].to_i(16)&amp;3|8).to_s(16)
-          uuid_.insert(8, '-')
-          uuid_.insert(13, '-')
-          uuid_.insert(18, '-')
-          uuid_.insert(23, '-')
-          uuid_
+    def self._get_default_record_id_generator  # :nodoc:
+      unless @_default_generator
+        if defined?(::SecureRandom)
+          def self._random_hex32
+            ::SecureRandom.hex(32)
+          end
+        elsif defined?(::ActiveSupport::SecureRandom)
+          def self._random_hex32
+            ::ActiveSupport::SecureRandom.hex(32)
+          end
+        else
+          def self._random_hex32
+            ::Kernel.rand(0x100000000000000000000000000000000).to_s(16).rjust(32, '0')
+          end
         end
-      else
-        lambda do
-          uuid_ = Kernel.rand(0x100000000000000000000000000000000).to_s(16).rjust(32, '0')
+        @_default_generator = ::Proc.new do
+          uuid_ = _random_hex32
           uuid_[12] = '4'
           uuid_[16] = (uuid_[16,1].to_i(16)&amp;3|8).to_s(16)
           uuid_.insert(8, '-')
@@ -363,8 +366,8 @@ module Sawmill
           uuid_
         end
       end
+      @_default_generator
     end
-    private :_get_default_record_id_generator
     
     
   end</diff>
      <filename>lib/sawmill/logger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -74,7 +74,7 @@ module Sawmill
       elsif processor_.respond_to?(:begin_record) &amp;&amp; processor_.respond_to?(:end_record)
         @processor = processor_
       end
-      @levels = opts_[:levels] || ::Sawmill::STANDARD_LEVELS
+      @levels = opts_[:levels] || STANDARD_LEVELS
       @emit_incomplete_records_at_eof = opts_[:emit_incomplete_records_at_eof]
       @current_record_id = nil
       @parser_directives = {}</diff>
      <filename>lib/sawmill/parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -142,9 +142,9 @@ module Sawmill
         when :append
           val_ = @attributes[entry_.key]
           case val_
-          when Array
+          when ::Array
             val_ &lt;&lt; entry_.value
-          when String
+          when ::String
             @attributes[entry_.key] = [val_, entry_.value]
           when nil
             @attributes[entry_.key] = [entry_.value]</diff>
      <filename>lib/sawmill/record.rb</filename>
    </modified>
    <modified>
      <diff>@@ -109,12 +109,12 @@ module Sawmill
       
       def _interpret_processor(param_)  # :nodoc:
         case param_
-        when Class
+        when ::Class
           param_.new
         when Base
           param_
         else
-          raise ArgumentError, &quot;Unknown processor object of type #{param_.class.name}&quot;
+          raise ::ArgumentError, &quot;Unknown processor object of type #{param_.class.name}&quot;
         end
       end
       </diff>
      <filename>lib/sawmill/record_processor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -49,7 +49,7 @@ module Sawmill
       
       def initialize(processor_, opts_={})
         @processor = processor_
-        @classifier = ::Sawmill::EntryClassifier.new(processor_)
+        @classifier = EntryClassifier.new(processor_)
       end
       
       </diff>
      <filename>lib/sawmill/record_processor/decompose.rb</filename>
    </modified>
    <modified>
      <diff>@@ -61,9 +61,9 @@ module Sawmill
         @attributes.each do |key_, value_|
           record_value_ = record_.attribute(key_.to_s)
           case record_value_
-          when Array
+          when ::Array
             return false unless record_value_.find{ |rval_| value_ === rval_ }
-          when String
+          when ::String
             return false unless value_ === record_value_
           when nil
             return false unless value_.nil?</diff>
      <filename>lib/sawmill/record_processor/filter_by_attributes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -73,13 +73,13 @@ module Sawmill
     
     def initialize(io_manager_, opts_={})
       @omit_directives = opts_.delete(:omit_directives)
-      if io_manager_.kind_of?(Class)
+      if io_manager_.kind_of?(::Class)
         @io_manager = io_manager_.new(opts_)
       else
         @io_manager = io_manager_
       end
       @handles ||= {}
-      @mutex ||= Monitor.new
+      @mutex ||= ::Monitor.new
     end
     
     </diff>
      <filename>lib/sawmill/rotater.rb</filename>
    </modified>
    <modified>
      <diff>@@ -63,7 +63,7 @@ module Sawmill
       # closed in the meantime.
       
       def open_handle(handle_)
-        STDOUT
+        ::STDOUT
       end
       
       </diff>
      <filename>lib/sawmill/rotater/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -82,8 +82,8 @@ module Sawmill
       
       def initialize(options_)
         @turnover_frequency = options_[:turnover_frequency] || :none
-        dirname_ = options_[:dirname] || Dir.getwd
-        @prefix = File.join(dirname_, options_[:prefix] || 'sawmill')
+        dirname_ = options_[:dirname] || ::Dir.getwd
+        @prefix = ::File.join(dirname_, options_[:prefix] || 'sawmill')
         @suffix = options_[:suffix] || '.log'
         @local_timezone = options_[:local_timezone]
         @date_pattern =
@@ -101,7 +101,7 @@ module Sawmill
       
       def preferred_handle
         if @date_pattern
-          time_ = Time.now
+          time_ = ::Time.now
           time_.utc unless @local_timezone
           time_.strftime(@date_pattern)
         else
@@ -118,7 +118,7 @@ module Sawmill
         else
           path_ = @prefix+@suffix
         end
-        file_ = File.open(path_, File::CREAT | File::WRONLY | File::APPEND)
+        file_ = ::File.open(path_, ::File::CREAT | ::File::WRONLY | ::File::APPEND)
         file_.sync = true
         file_
       end</diff>
      <filename>lib/sawmill/rotater/date_based_log_file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -91,11 +91,11 @@ module Sawmill
         end
         @history_size = options_[:history_size].to_i
         @history_size = 1 if @history_size &lt; 1 &amp;&amp; (@max_logfile_size || @shift_period)
-        dirname_ = options_[:dirname] || Dir.getwd
-        @normal_path = File.join(dirname_, options_[:filename] || 'sawmill.log')
+        dirname_ = options_[:dirname] || ::Dir.getwd
+        @normal_path = ::File.join(dirname_, options_[:filename] || 'sawmill.log')
         @preferred_handle = 0
         @open_handles = {}
-        @last_shift = Time.now
+        @last_shift = ::Time.now
       end
       
       
@@ -114,7 +114,7 @@ module Sawmill
         else
           path_ = &quot;#{@normal_path}.#{@preferred_handle-handle_-1}&quot;
         end
-        file_ = File.open(path_, File::CREAT | File::WRONLY | File::APPEND)
+        file_ = ::File.open(path_, ::File::CREAT | ::File::WRONLY | ::File::APPEND)
         file_.sync = true
         @open_handles[handle_] = true
         file_
@@ -126,7 +126,7 @@ module Sawmill
       def close_handle(handle_, io_)
         io_.close
         if @preferred_handle - handle_ &gt; @history_size
-          File.delete(&quot;#{@normal_path}.#{@preferred_handle-handle_-1}&quot;) rescue nil
+          ::File.delete(&quot;#{@normal_path}.#{@preferred_handle-handle_-1}&quot;) rescue nil
         end
         @open_handles.delete(handle_)
         nil
@@ -138,22 +138,22 @@ module Sawmill
       def before_write
         return unless @max_logfile_size || @shift_period
         turnover_ = false
-        if @max_logfile_size &amp;&amp; File.file?(@normal_path) &amp;&amp; File.size(@normal_path) &gt; @max_logfile_size
+        if @max_logfile_size &amp;&amp; ::File.file?(@normal_path) &amp;&amp; ::File.size(@normal_path) &gt; @max_logfile_size
           turnover_ = true
         end
-        if @shift_period &amp;&amp; (Time.now - @last_shift) &gt; @shift_period
+        if @shift_period &amp;&amp; (::Time.now - @last_shift) &gt; @shift_period
           turnover_ = true
         end
         if turnover_
           max_ = @preferred_handle - @open_handles.keys.min + 1
           max_ = @history_size if max_ &lt; @history_size
-          File.delete(&quot;#{@normal_path}.#{max_-1}&quot;) rescue nil
+          ::File.delete(&quot;#{@normal_path}.#{max_-1}&quot;) rescue nil
           (max_-1).downto(1) do |index_|
-            File.rename(&quot;#{@normal_path}.#{index_-1}&quot;, &quot;#{@normal_path}.#{index_}&quot;) rescue nil
+            ::File.rename(&quot;#{@normal_path}.#{index_-1}&quot;, &quot;#{@normal_path}.#{index_}&quot;) rescue nil
           end
-          File.rename(&quot;#{@normal_path}&quot;, &quot;#{@normal_path}.0&quot;) rescue nil
+          ::File.rename(&quot;#{@normal_path}&quot;, &quot;#{@normal_path}.0&quot;) rescue nil
           @preferred_handle += 1
-          @last_shift = Time.now
+          @last_shift = ::Time.now
         end
       end
       </diff>
      <filename>lib/sawmill/rotater/shifting_log_file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -48,7 +48,7 @@ module Sawmill
       
       def initialize(data_=nil, &amp;block_)
         @_heap = data_ || []
-        @_comparator = block_ || Proc.new{ |a_,b_| a_ &lt;=&gt; b_ }
+        @_comparator = block_ || ::Proc.new{ |a_,b_| a_ &lt;=&gt; b_ }
       end
       
       </diff>
      <filename>lib/sawmill/util/heap.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d36c2711add054eacdd31d8902692c1256187096</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Azuma</name>
    <email>dazuma@gmail.com</email>
  </author>
  <url>http://github.com/dazuma/sawmill/commit/1c7684a9cb9ccb7973e4daa2111b8423de8ec735</url>
  <id>1c7684a9cb9ccb7973e4daa2111b8423de8ec735</id>
  <committed-date>2009-10-28T16:43:18-07:00</committed-date>
  <authored-date>2009-10-28T16:43:18-07:00</authored-date>
  <message>Changes for 0.0.2</message>
  <tree>3c25bd7937b82f26fc022765a106adec3e220119</tree>
  <committer>
    <name>Daniel Azuma</name>
    <email>dazuma@gmail.com</email>
  </committer>
</commit>
