summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java
index d88aee0cb..3864ba1fd 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/SavePolicyHandler.java
@@ -26,7 +26,8 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.ParserConfigurationException;
-
+import org.onap.policy.common.logging.flexlogger.FlexLogger;
+import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.common.logging.eelf.PolicyLogger;
import org.onap.policy.pap.xacml.rest.XACMLPapServlet;
import org.onap.policy.pap.xacml.rest.policycontroller.PolicyCreation;
@@ -39,6 +40,7 @@ import org.xml.sax.SAXException;
import com.att.research.xacml.util.XACMLProperties;
public class SavePolicyHandler {
+ private static final Logger logger = FlexLogger.getLogger(SavePolicyHandler.class);
private HashMap<String, String> ErrorHeaders = null;
public void doPolicyAPIPut(HttpServletRequest request, HttpServletResponse response) throws IOException {
@@ -77,8 +79,7 @@ public class SavePolicyHandler {
response.addHeader("operation", "create");
}
} catch (Exception e1) {
- PolicyLogger.error(XACMLErrorConstants.ERROR_UNKNOWN +
- "Could not set data to policy adapter "+ e1.getMessage());
+ logger.error("Could not set data to policy adapter "+e1.getMessage(),e1);
}
}
}
@@ -150,7 +151,7 @@ public class SavePolicyHandler {
SavePolicyHandler instance = (SavePolicyHandler) savePolicyHandler.newInstance();
return instance;
} catch (Exception e) {
- PolicyLogger.error(e.getMessage());
+ logger.error(e.getMessage(),e);
}
return null;
}