Skip to content

Commit

Permalink
Bugfix/testnav logging (#3479)
Browse files Browse the repository at this point in the history
* Refaktorert Logback funksjonalitet til å displaye level og stacktrace osv, i påvente av ny funksjonalitet for maskering av logger
  • Loading branch information
stigus authored Apr 30, 2024
1 parent 7e14de5 commit a39107a
Show file tree
Hide file tree
Showing 82 changed files with 98 additions and 225 deletions.
3 changes: 1 addition & 2 deletions apps/adresse-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/amelding-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/brreg-stub/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
6 changes: 2 additions & 4 deletions apps/bruker-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand All @@ -25,8 +24,7 @@

<springProfile name="dev">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/budpro-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod,dev">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public static void main(String[] args) {

SpringApplication.run(DollyBackendApplicationStarter.class, args);
}
}
}
3 changes: 1 addition & 2 deletions apps/dolly-backend/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod,dev">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/dolly-frontend/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod,dev,idporten">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/kodeverk-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
3 changes: 1 addition & 2 deletions apps/miljoer-service/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.reactivecore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<configuration>
<springProfile name="prod">
<appender name="stdout_json" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackLayout"/>
<encoder class="no.nav.testnav.libs.servletcore.logging.TestnavLogbackEncoder">
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<rootCauseFirst>true</rootCauseFirst>
<maxDepthPerThrowable>256</maxDepthPerThrowable>
Expand Down
Loading

0 comments on commit a39107a

Please sign in to comment.