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

Allow prod config #543

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appenders section is there for a reason. Mainly to configure more than one appender and then select one through sysprops. But I guess this works as well.

<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>