Ignore:
Timestamp:
Mar 21, 2014, 12:32:41 PM (10 years ago)
Author:
casties
Branch:
default
Message:

change logging to java.util.logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorAnnotations.java

    r70 r75  
    7171    @Get("json")
    7272    public Representation doGetJSON(Representation entity) {
    73         logger.debug("AnnotatorAnnotations doGetJSON!");
     73        logger.fine("AnnotatorAnnotations doGetJSON!");
    7474        setCorsHeaders();
    7575        // id from URI /annotations/{id}
     
    8484            }
    8585            id = decodeJsonId(jsonId);
    86             logger.debug("annotation-id=" + id);
     86            logger.fine("annotation-id=" + id);
    8787        }
    8888
    8989        // do authentication
    9090        Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
    91         logger.debug("request authenticated=" + authUser);
     91        logger.fine("request authenticated=" + authUser);
    9292
    9393        if (id == null) {
     
    168168    @Post("json")
    169169    public Representation doPostJson(Representation entity) {
    170         logger.debug("AnnotatorAnnotations doPostJSON!");
     170        logger.fine("AnnotatorAnnotations doPostJSON!");
    171171        // set headers
    172172        setCorsHeaders();
     
    174174        // do authentication TODO: who's allowed to create?
    175175        Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
    176         logger.debug("request authenticated=" + authUser);
     176        logger.fine("request authenticated=" + authUser);
    177177        if (authUser == null) {
    178178            setStatus(Status.CLIENT_ERROR_FORBIDDEN, "Not Authorized!");
     
    223223    @Put("json")
    224224    public Representation doPutJSON(Representation entity) {
    225         logger.debug("AnnotatorAnnotations doPutJSON!");
     225        logger.fine("AnnotatorAnnotations doPutJSON!");
    226226        setCorsHeaders();
    227227        // id from URI /annotations/{id}
    228228        String jsonId = (String) getRequest().getAttributes().get("id");
    229229        String id = decodeJsonId(jsonId);
    230         logger.debug("annotation-id=" + id);
     230        logger.fine("annotation-id=" + id);
    231231
    232232        // do authentication
    233233        Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
    234         logger.debug("request authenticated=" + authUser);
     234        logger.fine("request authenticated=" + authUser);
    235235
    236236        Annotation annot = null;
     
    269269            return retRep;
    270270        } catch (JSONException e) {
    271             logger.error("Error in doPutJSON", e);
     271            logger.severe("Error in doPutJSON: "+e);
    272272            setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    273273        } catch (IOException e) {
    274             logger.error("Error in doPutJSON", e);
     274            logger.severe("Error in doPutJSON: "+e);
    275275            setStatus(Status.SERVER_ERROR_INTERNAL, "Other Error");
    276276        }
     
    286286    @Delete("json")
    287287    public Representation doDeleteJSON(Representation entity) {
    288         logger.debug("AnnotatorAnnotations doDeleteJSON!");
     288        logger.fine("AnnotatorAnnotations doDeleteJSON!");
    289289        setCorsHeaders();
    290290        // id from URI /annotations/{id}
    291291        String jsonId = (String) getRequest().getAttributes().get("id");
    292292        String id = decodeJsonId(jsonId);
    293         logger.debug("annotation-id=" + id);
     293        logger.fine("annotation-id=" + id);
    294294
    295295        // do authentication
    296296        Person authUser = Person.createPersonWithId(this.checkAuthToken(entity));
    297         logger.debug("request authenticated=" + authUser);
     297        logger.fine("request authenticated=" + authUser);
    298298        AnnotationStore store = getAnnotationStore();
    299299        Annotation annot = store.getAnnotationById(id);
Note: See TracChangeset for help on using the changeset viewer.