]> git.notmuchmail.org Git - sup/commitdiff
better logging
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 20 Aug 2007 06:28:42 +0000 (06:28 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 20 Aug 2007 06:28:42 +0000 (06:28 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@538 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/index.rb
lib/sup/mbox.rb

index 694800d69a0e436886f706bc356701f20f86ebf7..afc98faa3451741265bcd218185669172167e661 100644 (file)
@@ -229,7 +229,7 @@ EOS
   ## stops loading any thread if a message with a :killed flag is found.
   SAME_SUBJECT_DATE_LIMIT = 7
   def each_message_in_thread_for m, opts={}
-    Redwood::log "Building thread for #{m.id}: #{m.subj}"
+    #Redwood::log "Building thread for #{m.id}: #{m.subj}"
     messages = {}
     searched = {}
     num_queries = 0
@@ -270,14 +270,14 @@ EOS
         break if @index[docid][:label].split(/\s+/).include? "killed" unless opts[:load_killed]
         mid = @index[docid][:message_id]
         unless messages.member?(mid)
-          Redwood::log "got #{mid} as a child of #{id}"
+          #Redwood::log "got #{mid} as a child of #{id}"
           messages[mid] ||= lambda { build_message docid }
           refs = @index[docid][:refs].split(" ")
           pending += refs
         end
       end
     end
-    Redwood::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}" if num_queries > 0
+    Redwood::log "ran #{num_queries} queries to build thread of #{messages.size + 1} messages for #{m.id}: #{m.subj}" if num_queries > 0
     messages.each { |mid, builder| yield mid, builder }
   end
 
index 7459e80baf3ae8b4cea158f8160e3ddcbfac9b07..a40af24de10a8f432ccfb4b8ecfb951146f90940 100644 (file)
@@ -56,7 +56,7 @@ module MBox
         begin
           Rfc2047.decode_to $encoding, v
         rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence => e
-          Redwood::log "warning: error decoding RFC 2047 header: #{e.message}"
+          Redwood::log "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}"
           v
         end
     end