Skip to content

Commit

Permalink
switch to use of log4j2-sprin as file name #EA-3566
Browse files Browse the repository at this point in the history
  • Loading branch information
gsergiu committed Oct 6, 2023
1 parent f976475 commit 7d38019
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion k8s/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
readOnly: true
subPath: google-auth.json
- name: log4j-config
mountPath: "/opt/app/config/log4j2.xml"
mountPath: "/opt/app/config/log4j2-spring.xml"
readOnly: true
subPath: log4j2.xml
volumes:
Expand Down
5 changes: 4 additions & 1 deletion translation-web/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ info.app.name=${spring.application.name}
info.app.version=${project.version}
info.app.description=Europeana Translation API provides access to language detection and translation functionality

#switch Spring boot logging to log4j (see https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging)
org.springframework.boot.logging.LoggingSystem=Log4j2
#location of log4j config (needs to be mounted at the same location in k8s)
logging.config=/opt/app/config/log4j2.xml
# need to have -spring suffix to allow extension (https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging.log4j2-extensions)
logging.config=/opt/app/config/log4j2-spring.xml

## management / actuator / swagger
#springfox.documentation.swagger-ui.enabled=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<Logger name="eu.europeana.api.translation" level="INFO"/>
<Logger name="org.mongodb.driver.connection" level="WARN"/>
<Logger name="org.springframework" level="INFO"/>


</Loggers>
</Configuration>

0 comments on commit 7d38019

Please sign in to comment.