From 11a8eaf768babfdd0eaef985981a73947177f594 Mon Sep 17 00:00:00 2001 From: micdzied Date: Wed, 22 Aug 2018 13:30:31 +0200 Subject: logback according to casablanca Change-Id: Idce9f5e00a561f95afecae49008b4cd6aab8d8b1 Issue-ID: DCAEGEN2-726 Signed-off-by: micdzied --- .../src/main/resources/application.properties | 3 +- .../src/main/resources/logback-spring.xml | 71 ++++++++++++++++------ 2 files changed, 52 insertions(+), 22 deletions(-) diff --git a/prh-app-server/src/main/resources/application.properties b/prh-app-server/src/main/resources/application.properties index 2593b3d1..7c6d988c 100644 --- a/prh-app-server/src/main/resources/application.properties +++ b/prh-app-server/src/main/resources/application.properties @@ -10,5 +10,4 @@ logging.level.root=ERROR logging.level.org.springframework=ERROR logging.level.org.springframework.data=ERROR logging.level.org.onap.dcaegen2.services.prh=INFO -logging.file=logs/log/application.log -app.filepath=config/prh_endpoints.json +app.filepath=config/prh_endpoints.json \ No newline at end of file diff --git a/prh-app-server/src/main/resources/logback-spring.xml b/prh-app-server/src/main/resources/logback-spring.xml index 925b38cc..74c386b6 100644 --- a/prh-app-server/src/main/resources/logback-spring.xml +++ b/prh-app-server/src/main/resources/logback-spring.xml @@ -1,22 +1,47 @@ - + + + + + + + + - - + + + %nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n + + + - ${FILE_LOG_PATTERN} + %nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n ${LOG_FILE} - ${LOG_FILE}.%d{yyyy-MM-dd}.%i.log - 50MB - 30 - 10GB + ${LOG_FILE}.%d{yyyy-MM-dd}.%i.log.zip + ${maxFileSize} + ${maxHistory} + ${totalSizeCap} @@ -26,22 +51,28 @@ - + - ${FILE_LOG_PATTERN} + %nopexception%logger + |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} + |%level + |%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} + |%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} + |%thread + |%n - ${LOG_FILE} + ${log-path}/${outputFilename}.log - ${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz - 50MB - 30 - 10GB + ${archive}/${outputFilename}.%d{yyyy-MM-dd}.%i.log.zip + ${maxFileSize} + ${maxHistory} + ${totalSizeCap} - - \ No newline at end of file + -- cgit 1.2.3-korg