]> git.cworth.org Git - sup/commitdiff
Merge branch 'logging' into next
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sat, 22 Aug 2009 14:33:41 +0000 (10:33 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sat, 22 Aug 2009 14:33:41 +0000 (10:33 -0400)
1  2 
lib/sup/imap.rb
lib/sup/util.rb

diff --combined lib/sup/imap.rb
index 3cf6489c59ad62d6dc6cae83cb2ad0dae419062a,30b564402e245e3b46662a004fb9964bb94d16c4..bdb9e15b52fec1971b7e705ffa5e0ac6988e5446
@@@ -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 aa3ee764ac59b276d7f4ae758d4b119e141832c2,9c1a84ad2077f8308f5e394e1430474eae6c493f..068ce6bad904c9012bdcd5d8883ac48a68e59976
@@@ -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