sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 454d25c9fadc9a2f0663012a9d627ff27318cf19
parent 0d6cc9824d9c831aefee79e30908bf471e9d5009
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Mon, 20 Aug 2007 06:28:42 +0000

better logging

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@538 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/index.rb | 6 +++---
M lib/sup/mbox.rb | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -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
 
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
@@ -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