Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Commit

Permalink
Allow prod config
Browse files Browse the repository at this point in the history
via -Dlog4j2.configurationFile=log4j2-prod.xml

Signed-off-by: frank-bee <[email protected]>
  • Loading branch information
frank-bee committed Jul 14, 2021
1 parent 2a92d58 commit a2a6006
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions backend/business-partner-agent/src/main/resources/log4j2-prod.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Properties>
<Property name="PATTERN">%d{HH:mm:ss.SSS} [%t] %-5level %c{1} - %replace{%msg}{[\r\n]+}{}%n</Property>
</Properties>
<Appenders>
<Console name="ConsoleJSONAppender" target="SYSTEM_OUT">
<JsonLayout complete="false" compact="false"/>
</Console>
</Appenders>
<Loggers>
<Logger name="io.micronaut.context" level="info"/>
<Logger name="io.micronaut.security" level="info"/>
<logger name="io.micronaut.data.query" level="info"/>
<Logger name="com.zaxxer.hikari" level="warn"/>
<Logger name="org.flywaydb.core" level="info"/>
<Logger name="org.hyperledger.bpa" level="debug"/>
<Logger name="org.hyperledger.aries" level="trace"/>
<logger name="org.hyperledger.bpa.impl.aries" level="trace"/>
<Root level="warn">
<AppenderRef ref="ConsoleJSONAppender"/>
</Root>
</Loggers>
</Configuration>
6 changes: 3 additions & 3 deletions backend/business-partner-agent/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<Property name="PATTERN">%d{HH:mm:ss.SSS} [%t] %-5level %c{1} - %replace{%msg}{[\r\n]+}{}%n</Property>
</Properties>
<Appenders>
<Console name="STDOUT" target="SYSTEM_OUT">
<Console name="ConsolePatternAppender" target="SYSTEM_OUT">
<PatternLayout pattern="${PATTERN}"/>
</Console>
</Console>
</Appenders>
<Loggers>
<Logger name="io.micronaut.context" level="info"/>
Expand All @@ -18,7 +18,7 @@
<Logger name="org.hyperledger.aries" level="trace"/>
<logger name="org.hyperledger.bpa.impl.aries" level="trace"/>
<Root level="warn">
<AppenderRef ref="STDOUT"/>
<AppenderRef ref="ConsolePatternAppender"/>
</Root>
</Loggers>
</Configuration>

0 comments on commit a2a6006

Please sign in to comment.