From 644ce8a292fb7a21f7670a1cc85d70ba50c2e1f0 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Thu, 22 Aug 2024 14:52:14 +0000 Subject: [PATCH] [PAGOPA-2299] opt log: update log conf --- helm/Chart.yaml | 4 ++-- helm/values-dev.yaml | 2 +- helm/values-prod.yaml | 2 +- helm/values-uat.yaml | 2 +- host.json | 12 ++++++++---- pom.xml | 2 +- .../receipt/pdf/datastore/BizEventToReceipt.java | 2 +- .../receipt/pdf/datastore/CartEventToReceipt.java | 2 +- .../pdf/datastore/utils/BizEventToReceiptUtils.java | 2 -- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 3e98bbcd..4bc393f1 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopareceiptpdfdatastore description: Microservice description type: application -version: 0.119.0 -appVersion: 1.13.2-2-PAGOPA-2017 +version: 0.120.0 +appVersion: 1.13.3 dependencies: - name: microservice-chart version: 2.4.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 63dfb019..920c874b 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore - tag: "1.13.2-2-PAGOPA-2017" + tag: "1.13.3" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs livenessProbe: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index b0299bba..53dccd25 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore - tag: "1.13.2-2-PAGOPA-2017" + tag: "1.13.3" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs livenessProbe: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index fce3a04b..70c076d5 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-receipt-pdf-datastore - tag: "1.13.2-2-PAGOPA-2017" + tag: "1.13.3" pullPolicy: Always # https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/Controllers/HostController.cs livenessProbe: diff --git a/host.json b/host.json index 0a7a3198..bfc6fbce 100644 --- a/host.json +++ b/host.json @@ -18,12 +18,16 @@ } }, "logging": { - "fileLoggingMode": "always", + "fileLoggingMode": "debugOnly", "logLevel": { - "default": "Information", + "default": "None", "Host.Results": "Error", - "Function": "Information", - "Host.Aggregator": "Trace" + "Function.BizEventToReceiptProcessor": "Information", + "Function.CartEventToReceiptProcessor": "Information", + "Microsoft": "Information", + "Worker": "Information", + "Host.Aggregator": "Error", + "Host": "Error" }, "applicationInsights": { "samplingSettings": { diff --git a/pom.xml b/pom.xml index bfc86e16..69dd4b16 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ it.gov.pagopa.receipt receipt-pdf-datastore - 1.13.2-2-PAGOPA-2017 + 1.13.3 jar pagopa-receipt-pdf-datastore diff --git a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/BizEventToReceipt.java b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/BizEventToReceipt.java index 0223521c..0e29731d 100644 --- a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/BizEventToReceipt.java +++ b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/BizEventToReceipt.java @@ -97,7 +97,7 @@ public void processBizEventToReceipt( Receipt receipt = BizEventToReceiptUtils.createReceipt(bizEvent, bizEventToReceiptService, logger); - logger.info("[{}] function called at {} for event with id {} and status {}", + logger.debug("[{}] function called at {} for event with id {} and status {}", context.getFunctionName(), LocalDateTime.now(), bizEvent.getId(), bizEvent.getEventStatus()); if (isReceiptStatusValid(receipt)) { diff --git a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/CartEventToReceipt.java b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/CartEventToReceipt.java index 2c72daeb..d8935228 100644 --- a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/CartEventToReceipt.java +++ b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/CartEventToReceipt.java @@ -109,7 +109,7 @@ public void run( listOfFailedReceipt.add(receipt); } cartForReceipt.setStatus(CartStatusType.SENT); - logger.info("[{}] Cart with id {} processes successfully. Cart with status: {} and receipt with status: {}", + logger.debug("[{}] Cart with id {} processes successfully. Cart with status: {} and receipt with status: {}", context.getFunctionName(), cartForReceipt.getId(), cartForReceipt.getStatus(), receipt.getStatus()); } else { logger.error("[{}] Failed to process cart with id {}: fail to save receipt", diff --git a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/utils/BizEventToReceiptUtils.java b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/utils/BizEventToReceiptUtils.java index bc67db85..84b68271 100644 --- a/src/main/java/it/gov/pagopa/receipt/pdf/datastore/utils/BizEventToReceiptUtils.java +++ b/src/main/java/it/gov/pagopa/receipt/pdf/datastore/utils/BizEventToReceiptUtils.java @@ -87,8 +87,6 @@ public static boolean isBizEventInvalid(BizEvent bizEvent, ExecutionContext cont return true; } - // logger.info("[{}] event with id {} discarded because in status {}", context.getFunctionName(), bizEvent.getId(), bizEvent.getEventStatus()); - if (!BizEventStatusType.DONE.equals(bizEvent.getEventStatus())) { logger.debug("[{}] event with id {} discarded because in status {}", context.getFunctionName(), bizEvent.getId(), bizEvent.getEventStatus());