SF.net SVN: gar:[23683] csw/mgar/gar/v2/lib/web/releases_web.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu May 22 11:56:03 CEST 2014


Revision: 23683
          http://sourceforge.net/p/gar/code/23683
Author:   wahwah
Date:     2014-05-22 09:56:02 +0000 (Thu, 22 May 2014)
Log Message:
-----------
releases-web: Use the app logger for all logging

This way, the logging entries will end up in the app log.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/releases_web.py

Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py	2014-05-22 09:55:39 UTC (rev 23682)
+++ csw/mgar/gar/v2/lib/web/releases_web.py	2014-05-22 09:56:02 UTC (rev 23683)
@@ -239,7 +239,7 @@
       srv4 = models.Srv4FileStats.selectBy(md5_sum=md5_sum).getOne()
     except sqlobject.main.SQLObjectNotFound as e:
       raise web.notfound("Object %s not found" % (md5_sum))
-    logging.debug("Srv4CatalogAssignment::GET srv4: %s", srv4.basename)
+    applogger.debug("Srv4CatalogAssignment::GET srv4: %s", srv4.basename)
     srv4_in_c = models.Srv4FileInCatalog.selectBy(
         osrel=sqo_osrel,
         arch=sqo_arch,
@@ -260,9 +260,8 @@
     is to add the 'Content-Length' header.  However, it sometimes still gets
     stuck and I don't know why.
     """
-    # used for logging
     catspec = checkpkg_lib.CatalogSpec(catrel_name, arch_name, osrel_name)
-    logging.info('PUT %s %s', catspec, md5_sum)
+    applogger.info('PUT %s %s', catspec, md5_sum)
     try:
       if arch_name == 'all':
         raise web.badrequest("There is no 'all' catalog, cannot proceed.")
@@ -272,7 +271,7 @@
         try:
           srv4, _ = relational_util.StatsStructToDatabaseLevelOne(md5_sum)
         except errors.DataError as exc:
-          logging.warning(exc)
+          applogger.warning(exc)
           # TODO(maciej): Add the exception to the web.conflict() call.
           # webpy 0.37 apparently doesn't allow that.
           raise web.conflict()

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