From 13e9aa8e0613877c3ce63c878978e9cb31b92c48 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Sun, 25 Mar 2018 23:34:27 -0500 Subject: l2 management maturity pdp-d configurable log location metric/audit log for transaction metrics conforming to new field definition. support metrics/audits records with custom logback filters so they are not intrusive with developer log testing. Change-Id: I7a4dcc6790b85539e613ad8705e731e7298ce106 Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez --- .../policy/drools/http/server/internal/JettyJerseyServer.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'policy-endpoints/src/main/java') diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyJerseyServer.java b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyJerseyServer.java index f882c927..4f7c151e 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyJerseyServer.java +++ b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyJerseyServer.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-endpoints * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,12 +129,7 @@ public class JettyJerseyServer extends JettyServletServer { String hostname = this.connector.getHost(); if (hostname == null || hostname.isEmpty() || hostname.equals(NetworkUtil.IPv4_WILDCARD_ADDRESS)) { - try { - hostname = InetAddress.getLocalHost().getHostName(); - } catch (UnknownHostException e) { - logger.warn("{}: can't resolve connector's hostname: {}", this, hostname, e); - hostname = "localhost"; - } + hostname = NetworkUtil.getHostname(); } swaggerServlet.setInitParameter(SWAGGER_API_BASEPATH, -- cgit 1.2.3-korg