Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
aomegax committed Jan 5, 2024
1 parent d1c4340 commit a9e6054
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ standinmanager:
namespace: "nodo"
image:
repository: ghcr.io/pagopa/pagopa-stand-in-manager
tag: "0.0.1-21-fix_pom"
tag: "0.0.1-22-fix_pom"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>logback-ecs-encoder</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>

<build>
Expand Down
23 changes: 4 additions & 19 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProfile name="local">
<springProfile name="!default">
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
Expand All @@ -18,33 +18,18 @@
</root>
</springProfile>

<springProfile name="!local">
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />

<springProfile name="default">
<springProperty name="ECS_SERVICE_VERSION" source="info.application.version"/>
<springProperty name="ECS_SERVICE_NAME" source="info.application.name"/>

<appender name="ECS_JSON_CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="co.elastic.logging.logback.EcsEncoder">
<serviceName>${ECS_SERVICE_NAME}</serviceName>
<serviceName>${OTEL_SERVICE_NAME}</serviceName>
<serviceVersion>${ECS_SERVICE_VERSION}</serviceVersion>
<serviceEnvironment>${ENV}</serviceEnvironment>
</encoder>
</appender>

<appender name="CONSOLE_STD_OUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %clr(%mdc){magenta} %m%n%wEx
</Pattern>
</layout>
</appender>

<root level="INFO">
<!-- <appender-ref ref="ECS_JSON_CONSOLE"/>-->
<appender-ref ref="CONSOLE_STD_OUT" />
<appender-ref ref="ECS_JSON_CONSOLE"/>
</root>
</springProfile>

Expand Down

0 comments on commit a9e6054

Please sign in to comment.