]> git.phdru.name Git - bookmarks_db.git/commitdiff
Nicer logging.
authorOleg Broytman <phd@phdru.name>
Thu, 12 Aug 2010 19:45:02 +0000 (19:45 +0000)
committerOleg Broytman <phd@phdru.name>
Thu, 12 Aug 2010 19:45:02 +0000 (19:45 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@272 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/bkmk_rsimple.py

index 67d1fbe66239c8cc9fcf312d1fec3eda1f187b84..e01c7fece23cd612362ef862af0d486a580bfcdc 100644 (file)
@@ -251,18 +251,18 @@ class robot_simple(Robot):
       except IOError, msg:
          if (msg[0] == "http error") and (msg[1] == -1):
             bookmark.no_error = "The server did not return any header - it is not an error, actually"
-            self.log(bookmark.no_error)
+            self.log('   no headers: %s' % bookmark.no_error)
          else:
             bookmark.error = get_error(msg)
-            self.log(bookmark.error)
+            self.log('   Error: %s' % bookmark.error)
 
       except EOFError:
          bookmark.error = "Unexpected EOF (FTP server closed connection)"
-         self.log(bookmark.error)
+         self.log('   EOF: %s' % bookmark.error)
 
       except RedirectException, msg:
          bookmark.moved = str(msg)
-         self.log(bookmark.moved)
+         self.log('   Moved: %s' % bookmark.moved)
 
       except KeyboardInterrupt:
          self.log("Keyboard interrupt (^C)")
@@ -272,7 +272,7 @@ class robot_simple(Robot):
          import traceback
          traceback.print_exc()
          bookmark.error = "Exception!"
-         self.log(bookmark.error)
+         self.log('   Exception: %s' % bookmark.error)
 
       finally:
          self.finish_check_url(bookmark)