From c0b226153be760f3a93102e8a3886f52faed4b4b Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Thu, 2 Nov 2023 08:37:11 +0100 Subject: Change default logback config to write to stdout - write to stdout instead of to *.log files [1] - do not version the .classpath in git [1] This change only has an impact on local development (especially when run in docker containers), since the logback.xml is [fully overwritten anyways via OOM](https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/aai/components/aai-resources/resources/config/logback.xml;h=b52318500d1327d4756bea937e79d68b79e733e8;hb=HEAD) Issue-ID: AAI-3671 Change-Id: Ifb4b7b60a2bf7aa22210210fdbcbc05044c59e8b Signed-off-by: Fiete Ostkamp --- aai-resources/.classpath | 63 --------------- aai-resources/src/main/resources/logback.xml | 114 +++------------------------ aai-resources/src/test/resources/logback.xml | 99 +++++------------------ 3 files changed, 33 insertions(+), 243 deletions(-) delete mode 100644 aai-resources/.classpath (limited to 'aai-resources') diff --git a/aai-resources/.classpath b/aai-resources/.classpath deleted file mode 100644 index fadd195..0000000 --- a/aai-resources/.classpath +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aai-resources/src/main/resources/logback.xml b/aai-resources/src/main/resources/logback.xml index c7a2d3e..848c675 100644 --- a/aai-resources/src/main/resources/logback.xml +++ b/aai-resources/src/main/resources/logback.xml @@ -35,13 +35,6 @@ - @@ -61,13 +54,7 @@ - - ${logDirectory}/rest/sane.log - - ${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}.zip - ${maxHistory} - ${totalSizeCap} - + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n @@ -79,14 +66,7 @@ true - - ${logDirectory}/rest/metrics.log - - ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}.zip - ${maxHistory} - ${totalSizeCap} - + ${metricPattern} @@ -99,19 +79,12 @@ + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/rest/debug.log - - ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}.zip - ${maxHistory} - ${totalSizeCap} - ${debugPattern} @@ -123,14 +96,7 @@ true - ${logDirectory}/rest/error.log - - ${logDirectory}/rest/error.log.%d{yyyy-MM-dd}.zip - ${maxHistory} - ${totalSizeCap} - + class="ch.qos.logback.core.ConsoleAppender"> WARN @@ -145,14 +111,7 @@ - ${logDirectory}/rest/audit.log - - ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - + class="ch.qos.logback.core.ConsoleAppender"> ${auditPattern} @@ -165,19 +124,12 @@ + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/rest/translog.log - - ${logDirectory}/rest/translog.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${transLogPattern} @@ -190,17 +142,10 @@ + class="ch.qos.logback.core.ConsoleAppender"> WARN - ${logDirectory}/dmaapAAIEventConsumer/error.log - - ${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${errorPattern} @@ -208,87 +153,52 @@ + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/debug.log - - ${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${debugPattern} + class="ch.qos.logback.core.ConsoleAppender"> INFO ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log - - ${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${auditPattern} + class="ch.qos.logback.core.ConsoleAppender"> INFO ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/metrics.log - - ${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${metricPattern} + class="ch.qos.logback.core.ConsoleAppender"> WARN - ${logDirectory}/external/external.log - - ${logDirectory}/external/external.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - ${debugPattern} + class="ch.qos.logback.core.ConsoleAppender"> DEBUG - ${logDirectory}/auth/auth.log - - ${logDirectory}/auth/auth.log.%d{yyyy-MM-dd}.zip - - ${maxHistory} - ${totalSizeCap} - %d{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}[%thread] %-5level %logger{1024} - %msg%n diff --git a/aai-resources/src/test/resources/logback.xml b/aai-resources/src/test/resources/logback.xml index 8f0e0d7..4504bce 100644 --- a/aai-resources/src/test/resources/logback.xml +++ b/aai-resources/src/test/resources/logback.xml @@ -26,18 +26,15 @@ + + + + - @@ -65,11 +62,7 @@ - - ${logDirectory}/rest/sane.log - - ${logDirectory}/rest/sane.log.%d{yyyy-MM-dd} - + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n @@ -77,56 +70,41 @@ - 1000 + ${queueSize} true - - ${logDirectory}/rest/metrics.log - - ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} - + ${metricPattern} - 1000 + ${queueSize} true + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/rest/debug.log - - ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} - ${debugPattern} - 1000 + ${queueSize} true - ${logDirectory}/rest/error.log - - ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} - + class="ch.qos.logback.core.ConsoleAppender"> WARN @@ -136,61 +114,46 @@ - 1000 + ${queueSize} - ${logDirectory}/rest/audit.log - - ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} - - + class="ch.qos.logback.core.ConsoleAppender"> ${auditPattern} - 1000 + ${queueSize} true + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/rest/translog.log - - ${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} - - ${transLogPattern} - 1000 + ${queueSize} true + class="ch.qos.logback.core.ConsoleAppender"> WARN - ${logDirectory}/dmaapAAIEventConsumer/error.log - - ${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} - - ${errorPattern} @@ -198,63 +161,43 @@ + class="ch.qos.logback.core.ConsoleAppender"> DEBUG ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/debug.log - - ${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} - - ${debugPattern} + class="ch.qos.logback.core.ConsoleAppender"> INFO ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log - - ${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log.%d{yyyy-MM-dd} - - ${auditPattern} + class="ch.qos.logback.core.ConsoleAppender"> INFO ACCEPT DENY - ${logDirectory}/dmaapAAIEventConsumer/metrics.log - - ${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} - - ${metricPattern} + class="ch.qos.logback.core.ConsoleAppender"> WARN - ${logDirectory}/external/external.log - - ${logDirectory}/external/external.log.%d{yyyy-MM-dd} - - ${debugPattern} -- cgit 1.2.3-korg