Commit 5939afa5 authored by Andre Freyssinet's avatar Andre Freyssinet

Minor changes.

parent b932983e
......@@ -66,7 +66,6 @@ import fr.dyade.aaa.common.Debug;
@Path("/" + JmsContextService.CONTEXT)
public class JmsContextService {
public static Logger logger = Debug.getLogger(JmsContextService.class.getName());
private final Helper helper = Helper.getInstance();
......@@ -86,19 +85,16 @@ public class JmsContextService {
public static final String JMS_TYPE = "type";
public static void logLinks(Response.ResponseBuilder builder) {
if (builder == null)
if ((builder == null) || !logger.isLoggable(BasicLevel.DEBUG))
return;
Response response = builder.build();
if (response != null) {
Set<Link> links = response.getLinks();
if (logger.isLoggable(BasicLevel.INFO))
logger.log(BasicLevel.INFO, "links: ");
logger.log(BasicLevel.DEBUG, "links: ");
for (Link link : links) {
if (logger.isLoggable(BasicLevel.INFO))
logger.log(BasicLevel.INFO, "\t" + link.getRel() + ": " + link.getUri());
logger.log(BasicLevel.DEBUG, "\t" + link.getRel() + ": " + link.getUri());
}
if (logger.isLoggable(BasicLevel.INFO))
logger.log(BasicLevel.INFO, "");
}
}
......
......@@ -37,7 +37,6 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment