From 7fcc895e05176b786cd6dcfaf8aba8190c53e1e7 Mon Sep 17 00:00:00 2001 From: Michal Korman Date: Thu, 24 May 2018 12:47:40 +0200 Subject: Replace printStackTrace with usage of logger Change-Id: I648e5a25337beca1f8c483ba6e5359d245e237d3 Issue-ID: SO-642 Signed-off-by: mkorman --- .../process/ActivateVnfOperationalEnvironment.java | 12 ++++-------- .../process/CreateEcompOperationalEnvironment.java | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java index 24111c43c2..1bfe979f4f 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironment.java @@ -217,17 +217,13 @@ public class ActivateVnfOperationalEnvironment extends OperationalEnvironmentPro AAIResultWrapper aaiResult = aaiHelper.getAaiOperationalEnvironment(operationalEnvironmentId); operationalEnv = aaiResult.asBean(AAIOperationalEnvironment.class).get(); } catch (JsonParseException e) { - msoLogger.debug(" **** JsonParseException: " + e.getMessage()); - e.printStackTrace(); + msoLogger.error(" **** JsonParseException: ", e); } catch (JsonMappingException e) { - msoLogger.debug(" **** JsonMappingException: " + e.getMessage()); - e.printStackTrace(); + msoLogger.error(" **** JsonMappingException: ", e); } catch (IOException e) { - msoLogger.debug(" **** IOException: " + e.getMessage()); - e.printStackTrace(); + msoLogger.error(" **** IOException: ", e); } catch (Exception e) { - msoLogger.debug(" **** Exception: " + e.getMessage()); - e.printStackTrace(); + msoLogger.error(" **** Exception: ", e); } return operationalEnv; diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java index 1ce3c5e06d..3dd1b72ca6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironment.java @@ -67,7 +67,7 @@ public class CreateEcompOperationalEnvironment extends OperationalEnvironmentPro getRequestDb().updateInfraSuccessCompletion("SUCCESSFULLY Created ECOMP OperationalEnvironment.", getRequestId(), getRequest().getOperationalEnvironmentId()); } catch (Exception e) { - e.printStackTrace(); + msoLogger.error("exception while publishing operational environment", e); msoLogger.error(MessageEnum.APIH_GENERAL_EXCEPTION, "", "", "", MsoLogger.ErrorCode.UnknownError, e.getMessage()); getRequestDb().updateInfraFailureCompletion(e.getMessage(), getRequestId(), getRequest().getOperationalEnvironmentId()); } -- cgit 1.2.3-korg