You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/08/22 18:20:18 UTC

git commit: Add logging to debug Trac import

Updated Branches:
  refs/heads/master 71176e605 -> 8c24eec4c


Add logging to debug Trac import

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8c24eec4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8c24eec4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8c24eec4

Branch: refs/heads/master
Commit: 8c24eec4ce11dd6fa76b1124302e84bf4568c240
Parents: 71176e6
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Aug 22 16:20:05 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Aug 22 16:20:05 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/import_api.py               | 5 ++---
 ForgeImporters/forgeimporters/trac/tickets.py | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8c24eec4/Allura/allura/lib/import_api.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/import_api.py b/Allura/allura/lib/import_api.py
index 8eeb8a7..9e383b5 100644
--- a/Allura/allura/lib/import_api.py
+++ b/Allura/allura/lib/import_api.py
@@ -15,7 +15,6 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
-import sys
 import urllib
 import urllib2
 import urlparse
@@ -25,8 +24,8 @@ import json
 import logging
 from datetime import datetime
 
+log = logging.getLogger(__name__)
 
-log = logging.getLogger('import')
 
 class AlluraImportApiClient(object):
 
@@ -48,7 +47,7 @@ class AlluraImportApiClient(object):
     def call(self, url, **params):
         url = urlparse.urljoin(self.base_url, url)
         if self.verbose:
-            print "Using URL '%s'" % (url)
+            log.info("Import API URL: %s", url)
 
         params = self.sign(urlparse.urlparse(url).path, params.items())
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8c24eec4/ForgeImporters/forgeimporters/trac/tickets.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/trac/tickets.py b/ForgeImporters/forgeimporters/trac/tickets.py
index ef099ca..dfbb2a2 100644
--- a/ForgeImporters/forgeimporters/trac/tickets.py
+++ b/ForgeImporters/forgeimporters/trac/tickets.py
@@ -107,7 +107,7 @@ class TracTicketImporter(ToolImporter):
                 expires=datetime.utcnow() + timedelta(minutes=60))
         session(api_ticket).flush(api_ticket)
         cli = AlluraImportApiClient(config['base_url'], api_ticket.api_key,
-                api_ticket.secret_key, False)
+                api_ticket.secret_key, verbose=True)
         import_tracker(cli, project.shortname, mount_point,
                 {'user_map': json.loads(user_map) if user_map else {}},
                 export_string, validate=False)