Commit 5e64a8f9 authored by afreyssin's avatar afreyssin
Browse files

Logging enhancements.

parent 3f08faea
...@@ -740,17 +740,18 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -740,17 +740,18 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
} }
private void closeConsumer() { private void closeConsumer() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "RestAcquisitionAsync.closeConsumer():");
if (uriCloseConsumer != null) { if (uriCloseConsumer != null) {
try { try {
Response response = client.target(uriCloseConsumer).request().accept(MediaType.TEXT_PLAIN).delete(); Response response = client.target(uriCloseConsumer).request().accept(MediaType.TEXT_PLAIN).delete();
if (logger.isLoggable(BasicLevel.DEBUG)) if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "RestDistribution.closeConsumer(): -> " + response.getStatus()); logger.log(BasicLevel.DEBUG, "RestAcquisitionAsync.closeConsumer(): -> " + response.getStatus());
} catch (Exception exc) { } catch (Exception exc) {
logger.log(BasicLevel.ERROR, "RestDistribution.closeConsumer()", exc); logger.log(BasicLevel.WARN, "RestAcquisitionAsync.closeConsumer()", exc);
return; return;
} finally { } finally {
// TODO (AF): To remove.
logger.log(BasicLevel.ERROR, "RestDistribution.closeConsumer()", new Exception());
uriCloseConsumer = null; uriCloseConsumer = null;
} }
} }
...@@ -852,7 +853,8 @@ public class RestAcquisitionAsync implements AcquisitionDaemon { ...@@ -852,7 +853,8 @@ public class RestAcquisitionAsync implements AcquisitionDaemon {
@Override @Override
public synchronized void stop() { public synchronized void stop() {
logger.log(BasicLevel.ERROR, "RestAcquisitionAsync.Daemon.stop()", new Exception()); if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "RestAcquisitionAsync.Daemon.stop()", new Exception());
super.stop(); super.stop();
} }
......
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