Permalink
Browse files

WL-1709 Switch to logging for outputting the Primo requests/responses.

This is only done at DEBUG level.
  • Loading branch information...
1 parent e7f65ed commit 28e54e526f432f3e9c2f843763ba6ffaeccff250 @buckett buckett committed Aug 15, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/main/java/uk/ac/ox/oucs/sirlouie/primo/PrimoService.java
@@ -43,12 +43,16 @@ public ResponseBean getResource(String id) throws Exception {
params.add("onCampus", "false");
WebResource query = webResource.queryParams(params);
- //System.out.println("PrimoService.query ["+query.getURI().toString()+"]");
+ if (log.isDebugEnabled()) {
+ log.debug("Making request: "+ query.getURI().toString());
+ }
- String responseXML = webResource.queryParams(params).get(String.class);
- //System.out.println("PrimoService.response ["+responseXML+"]");
- //log.debug("response ["+responseXML+"]");
+ String responseXML = query.get(String.class);
+ if (log.isDebugEnabled()) {
+ log.debug("Got response: "+ responseXML);
+ }
+ // Create a DAIA response.
ResponseBean responseBean = new ResponseBean(id);
Collection<SearObject> beans = filterResponse(nameSpaceURI, responseXML);
responseBean.addSearObjects(beans);

0 comments on commit 28e54e5

Please sign in to comment.