Skip to content

Commit

Permalink
[PAGOPA-2299] opt log: update log conf
Browse files Browse the repository at this point in the history
  • Loading branch information
pagopa-github-bot authored and aacitelli committed Oct 17, 2024
1 parent bf81a59 commit 644ce8a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 8 additions & 4 deletions host.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>it.gov.pagopa.receipt</groupId>
<artifactId>receipt-pdf-datastore</artifactId>
<version>1.13.2-2-PAGOPA-2017</version>
<version>1.13.3</version>
<packaging>jar</packaging>

<name>pagopa-receipt-pdf-datastore</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 644ce8a

Please sign in to comment.