diff src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorSearch.java @ 75:25eb2e1df106

change logging to java.util.logging.
author casties
date Fri, 21 Mar 2014 13:32:41 +0100
parents 2b1e6df5e21a
children b406507a953d
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorSearch.java	Wed Mar 12 12:42:28 2014 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorSearch.java	Fri Mar 21 13:32:41 2014 +0100
@@ -64,11 +64,11 @@
      */
     @Get("json")
     public Representation doGetJSON(Representation entity) {
-        logger.debug("AnnotatorSearch doGetJSON!");
+        logger.fine("AnnotatorSearch doGetJSON!");
         setCorsHeaders();
         // do authentication
         Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
-        logger.debug("request authenticated=" + authUser);
+        logger.fine("request authenticated=" + authUser);
 
         Form form = getRequest().getResourceRef().getQueryAsForm();
         String uri = form.getFirstValue("uri");
@@ -79,7 +79,7 @@
 
         // do search
         ArrayList<JSONObject> results = new ArrayList<JSONObject>();
-        logger.debug(String.format("searching for uri=%s user=%s", uri, user));
+        logger.fine(String.format("searching for uri=%s user=%s", uri, user));
         AnnotationStore store = getAnnotationStore();
         List<Annotation> annots = store.searchAnnotationByUriUser(uri, user);
         for (Annotation annot : annots) {
@@ -119,8 +119,8 @@
             return null;
         }
 
-        logger.debug("sending:");
-        logger.debug(result);
+        logger.fine("sending:");
+        logger.fine(result.toString());
         return new JsonRepresentation(result);
     }