diff --git a/pom.xml b/pom.xml index 9a3aa8a..a144db2 100644 --- a/pom.xml +++ b/pom.xml @@ -55,12 +55,12 @@ org.springframework.boot spring-boot-starter - - - org.springframework.boot - spring-boot-starter-logging - - + + + + co.elastic.logging + logback-ecs-encoder + 1.3.2 diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 461e6a1..becbeae 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -48,3 +48,6 @@ logging.level.org.springframework.web=INFO logging.level.org.hibernate=INFO logging.level.com.iemr=DEBUG logging.level.org.springframework=INFO + +logging.path=logs/ +logging.file.name=logs/helpline1097-api.log diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..50aecbc --- /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 78302a2..0000000 --- a/src/main/resources/logback.xml +++ /dev/null @@ -1,32 +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 0000000..545b679 --- /dev/null +++ b/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file