From 968fa4f83787fb03d56de52616a8fcd7f55cd474 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 25 Oct 2016 13:57:36 +0530 Subject: [PATCH] added message directly to log --- .../service/impl/AndroidSenseServiceImpl.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseServiceImpl.java b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseServiceImpl.java index f1483e417a..b98fb0bddb 100644 --- a/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseServiceImpl.java +++ b/components/iot-plugins/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.api/src/main/java/org/wso2/carbon/device/mgt/iot/androidsense/service/impl/AndroidSenseServiceImpl.java @@ -86,8 +86,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService { log.error(e.getErrorMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); } catch (OperationManagementException e) { - String msg = "Error occurred while executing command operation to send keywords"; - log.error(msg, e); + log.error("Error occurred while executing command operation to send keywords", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } } @@ -125,8 +124,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService { } catch (DeviceAccessAuthorizationException e) { return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); } catch (OperationManagementException e) { - String msg = "Error occurred while executing command operation to set threashold"; - log.error(msg, e); + log.error("Error occurred while executing command operation to set threashold", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } } @@ -165,8 +163,7 @@ public class AndroidSenseServiceImpl implements AndroidSenseService { log.error(e.getErrorMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); } catch (OperationManagementException e) { - String msg = "Error occurred while executing command operation to remove words"; - log.error(msg, e); + log.error("Error occurred while executing command operation to remove words", e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); } }