Commit 2bf4f176 authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancement: avoid to systematically log links.

parent ebb32e2e
......@@ -84,13 +84,15 @@ public class JmsContextService {
public static final String JMS_BODY = "body";
public static final String JMS_TYPE = "type";
private static boolean nologlink = ! Boolean.getBoolean("org.objectweb.joram.tools.rest.jms.loglink");
public static void logLinks(Response.ResponseBuilder builder) {
if ((builder == null) || !logger.isLoggable(BasicLevel.DEBUG))
if (nologlink || (builder == null) || !logger.isLoggable(BasicLevel.DEBUG))
return;
Response response = builder.build();
if (response != null) {
Set<Link> links = response.getLinks();
logger.log(BasicLevel.DEBUG, "links: ");
logger.log(BasicLevel.DEBUG, "links: " + nologlink);
for (Link link : links) {
logger.log(BasicLevel.DEBUG, "\t" + link.getRel() + ": " + link.getUri());
}
......
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