diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-14 03:05:23 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-14 03:08:37 +0100 |
commit | a8a2dc9b50eb9f0c067a4524cde9e8a458d5657f (patch) | |
tree | 56e9b7e6f464f86d92c28279197c00d294d30ab2 /sw-server/src | |
parent | Add timestamp to logs (diff) | |
download | seven-wonders-a8a2dc9b50eb9f0c067a4524cde9e8a458d5657f.tar.gz seven-wonders-a8a2dc9b50eb9f0c067a4524cde9e8a458d5657f.tar.bz2 seven-wonders-a8a2dc9b50eb9f0c067a4524cde9e8a458d5657f.zip |
Use profiles to avoid sending local logs to Loki
Diffstat (limited to 'sw-server/src')
-rw-r--r-- | sw-server/src/main/resources/logback-spring.xml (renamed from sw-server/src/main/resources/logback.xml) | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sw-server/src/main/resources/logback.xml b/sw-server/src/main/resources/logback-spring.xml index 766c0a5c..07b9e58e 100644 --- a/sw-server/src/main/resources/logback.xml +++ b/sw-server/src/main/resources/logback-spring.xml @@ -28,11 +28,20 @@ </format> </appender> - <root level="DEBUG"> - <appender-ref ref="CONSOLE"/> - </root> - <root level="INFO"> - <appender-ref ref="LOKI"/> - </root> + <springProfile name="prod"> + <root level="INFO"> + <appender-ref ref="CONSOLE"/> + <appender-ref ref="LOKI"/> + </root> + </springProfile> + + <springProfile name="!prod"> + <root level="DEBUG"> + <appender-ref ref="CONSOLE"/> + </root> + <logger name="org.springframework" level="INFO" additivity="false"> + <appender-ref ref="CONSOLE" /> + </logger> + </springProfile> </configuration> |