From: William Morgan Date: Sat, 22 Aug 2009 14:33:41 +0000 (-0400) Subject: Merge branch 'logging' into next X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=ef1d8a9333f8d261deeb88a7c1cb0cc58d7b6563;hp=-c;p=sup Merge branch 'logging' into next --- ef1d8a9333f8d261deeb88a7c1cb0cc58d7b6563 diff --combined lib/sup/imap.rb index 3cf6489,30b5644..bdb9e15 --- a/lib/sup/imap.rb +++ b/lib/sup/imap.rb @@@ -48,7 -48,6 +48,7 @@@ require 'set module Redwood class IMAP < Source + include SerializeLabelsNicely SCAN_INTERVAL = 60 # seconds ## upon these errors we'll try to rereconnect a few times @@@ -276,7 -275,7 +276,7 @@@ privat def say s @say_id = BufferManager.say s, @say_id if BufferManager.instantiated? - debug s + info s end def shutup diff --combined lib/sup/util.rb index aa3ee76,9c1a84a..068ce6b --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@@ -25,7 -25,6 +25,7 @@@ class Lockfil def lockinfo_on_disk h = load_lock_id IO.read(path) h['mtime'] = File.mtime path + h['path'] = path h end @@@ -92,7 -91,7 +92,7 @@@ en class Range ## only valid for integer ranges (unless I guess it's exclusive) - def size + def size last - first + (exclude_end? ? 0 : 1) end end @@@ -654,7 -653,7 +654,7 @@@ class Icon begin Iconv.iconv(target + "//IGNORE", charset, text + " ").join[0 .. -2] rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::InvalidCharacter, Iconv::IllegalSequence => e - info "couldn't transcode text from #{charset} to #{target} (\"#{text[0 ... 20]}\"...)" + warn "couldn't transcode text from #{charset} to #{target} (\"#{text[0 ... 20]}\"...) (got #{e.message}); using original as is" text end end