X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PDP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdp%2Frest%2FXACMLPdpServlet.java;h=04572ccbc507a2ca521f3f1af0795ad9416db3f1;hb=f799af84c1777d1b56641c758bdf6064b494d71d;hp=b824312dcfd1e50a02b1d851ef2a8d229dc975b3;hpb=775f45908025e46a40c9c147fca2066af5c8c5b8;p=policy%2Fengine.git diff --git a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpServlet.java b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpServlet.java index b824312dc..04572ccbc 100644 --- a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpServlet.java +++ b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpServlet.java @@ -229,8 +229,8 @@ public class XACMLPdpServlet extends HttpServlet implements Runnable { baseLoggingContext = new ONAPLoggingContext(); // fixed data that will be the same in all logging output goes here try { - String ipaddress = InetAddress.getLocalHost().getHostAddress(); - baseLoggingContext.setServer(ipaddress); + String hostname = InetAddress.getLocalHost().getCanonicalHostName(); + baseLoggingContext.setServer(hostname); } catch (UnknownHostException e) { logger.warn(XACMLErrorConstants.ERROR_SYSTEM_ERROR + "Unable to get hostname for logging"+e); }