[csw-devel] SF.net SVN: gar:[14127] csw/mgar/gar/v2/lib/python/csw_upload_pkg.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Apr 11 11:16:37 CEST 2011


Revision: 14127
          http://gar.svn.sourceforge.net/gar/?rev=14127&view=rev
Author:   wahwah
Date:     2011-04-11 09:16:37 +0000 (Mon, 11 Apr 2011)

Log Message:
-----------
csw-upload-pkg: Logging messages moved to debug

Moving a couple of messages from info to debug.  This will reduce the
noise on the screen.  Messages about inserting and removing packages
from catalogs need to stay on the screen, and can be converted into
print statements (non-logging screen outut).

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/csw_upload_pkg.py

Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-04-11 09:16:01 UTC (rev 14126)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg.py	2011-04-11 09:16:37 UTC (rev 14127)
@@ -274,8 +274,8 @@
             first_cat_osrel_seen = srv4_in_catalog["osrel"]
           else:
             first_cat_osrel_seen = srv4_osrel
-          logging.info("Considering %s the base OS to match",
-                       first_cat_osrel_seen)
+          logging.debug("Considering %s the base OS to match",
+                        first_cat_osrel_seen)
         if (not srv4_in_catalog
             or srv4_in_catalog["osrel"] == srv4_osrel
             or srv4_in_catalog["osrel"] == first_cat_osrel_seen):
@@ -289,7 +289,7 @@
             logging.debug("OS release specified and matches %s.", osrel)
             catalogs.append(cat_key)
           else:
-            logging.info(
+            logging.debug(
                 "Not matching %s %s package with %s containing a %s package",
                 catalogname,
                 srv4_osrel, osrel, srv4_in_catalog["osrel"])
@@ -381,11 +381,12 @@
     if successful:
       metadata = json.loads(d.getvalue())
     else:
-      logging.info("Metadata for %s were not found in the database" % repr(md5_sum))
+      logging.debug("Metadata for %s were not found in the database" % repr(md5_sum))
     return successful, metadata
 
   def _PostFile(self, filename):
-    logging.info("Uploading %s", repr(filename))
+    if self.output_to_screen:
+      print "Uploading %s" % repr(filename)
     md5_sum = self._GetFileMd5sum(filename)
     c = pycurl.Curl()
     d = StringIO()


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list