diff --git a/pom.xml b/pom.xml index 18e665cb..d1b7087b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ v-1.0 war - hwc-facility-service + hwc-facility-service-api Piramal HWC Service / APIs @@ -48,12 +48,11 @@ org.springframework.boot spring-boot-starter - - - org.springframework.boot - spring-boot-starter-logging - - + + + co.elastic.logging + logback-ecs-encoder + 1.3.2 org.springframework.boot diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4650ceed..9ae8b344 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -43,5 +43,7 @@ logging.level.org.hibernate=INFO logging.level.com.iemr=DEBUG logging.level.org.springframework=INFO -# Keep a line at the end so that environment.ts file can be appended properly +logging.path=logs/ +logging.file.name=logs/hwc-api.log +# Keep a line at the end so that environment.ts file can be appended properly diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..50aecbc8 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,27 @@ + + + + + + ${LOG_FILE}.json + + ${LOG_FILE}.json.%d{yyyy-MM-dd}.gz + 100MB + 0 + true + + + + + + 512 + 0 + false + + + + + + + \ No newline at end of file diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml deleted file mode 100644 index af23c3ec..00000000 --- a/src/main/resources/logback.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - ${HOME_LOG} - - - logs/archived/app.%d{yyyy-MM-dd}.%i.log.gz - - 1MB - - 20GB - - 60 - - - - %d %-5p [%X{sessionId}] [%X{userId}] %C{1}.%M:%L] %m%n - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/src/main/webapp/WEB-INF/jboss-deployment-structure.xml new file mode 100644 index 00000000..545b6796 --- /dev/null +++ b/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file