Skip to content

Commit

Permalink
moved logging config to java tool options #EA-3566
Browse files Browse the repository at this point in the history
  • Loading branch information
gsergiu committed Oct 6, 2023
1 parent d4af94c commit 9b3e41f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions k8s/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
value: "/opt/app/config/translation.user.properties"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/opt/app/config/google-auth.json"

ports:
- containerPort: 8080
livenessProbe:
Expand Down
5 changes: 3 additions & 2 deletions k8s/overlays/cloud/deployment_patch.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ spec:
- name: translation-api
imagePullPolicy: Always
env:
- name: CATALINA_OPTS
- name: JAVA_TOOL_OPTIONS
value: "-javaagent:/usr/local/elastic-apm-agent.jar
-Delastic.apm.application_packages=${ELASTIC_APP_PACKAGES}
-Delastic.apm.server_urls=${ELASTIC_APM_SERVERS}
-Delastic.apm.service_name=${APP_NAME}
-Delastic.apm.enabled=${COLLECT_APM}
-Delastic.apm.environment=${K8S_NAMESPACE}"
-Delastic.apm.environment=${K8S_NAMESPACE}
-Dlogging.config=/opt/app/config/log4j2-spring.xml"
resources:
requests:
memory: "${MEMORY_REQUEST}M"
Expand Down
4 changes: 0 additions & 4 deletions translation-web/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ info.app.description=Europeana Translation API provides access to language detec
#switch Spring boot logging to log4j (see https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.logging)
org.springframework.boot.logging.LoggingSystem= org.springframework.boot.logging.log4j2.Log4J2LoggingSystem

#location of log4j config (needs to be mounted at the same location in k8s)
# 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
management.security.enabled=false
Expand Down

0 comments on commit 9b3e41f

Please sign in to comment.