Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

chore(logging): enable gzipped log rotation and adjust test logging (#7648)

Ludybe130282098c
diff --git a/app/core/.gitignore b/app/core/.gitignore
index 7d9dd62931..c207c6c09a 100644
--- a/app/core/.gitignore
+++ b/app/core/.gitignore
@@ -106,6 +106,7 @@ SwaggerDoc.json
# Log file
*.log
+*.log.gz
# BlueJ files
*.ctxt
diff --git a/app/core/src/main/resources/logback.xml b/app/core/src/main/resources/logback.xml
index c0779735ae..ebdeeda64b 100644
--- a/app/core/src/main/resources/logback.xml
+++ b/app/core/src/main/resources/logback.xml
@@ -16,8 +16,9 @@
<pattern>%d %p %c{1} [%thread] %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${LOG_PATH}/auth-%d{yyyy-MM-dd}.log</fileNamePattern>
- <maxHistory>1</maxHistory>
+ <fileNamePattern>${LOG_PATH}/auth-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
+ <maxHistory>7</maxHistory>
+ <totalSizeCap>64MB</totalSizeCap>
</rollingPolicy>
</appender>
@@ -28,8 +29,9 @@
<pattern>%d %p %c{1} [%thread] %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${LOG_PATH}/info-%d{yyyy-MM-dd}.log</fileNamePattern>
- <maxHistory>1</maxHistory>
+ <fileNamePattern>${LOG_PATH}/info-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
+ <maxHistory>7</maxHistory>
+ <totalSizeCap>256MB</totalSizeCap>
</rollingPolicy>
</appender>
diff --git a/build.gradle b/build.gradle
index ffaba65377..fdc59f3680 100644
--- a/build.gradle
+++ b/build.gradle
@@ -306,7 +306,7 @@ subprojects {
systemProperty 'apple.awt.UIElement', 'true'
testLogging {
- events "started", "failed"
+ events "skipped", "failed"
showExceptions = true
showCauses = true
showStackTraces = true