Merge branch 'RED-7715' into 'master'
RED-7715 - Modify log4j config to enable switching between console and json based on env var Closes RED-7715 See merge request redactmanager/persistence-service!251
This commit is contained in:
commit
ba21282b1c
@ -1,7 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Configuration status="INFO">
|
<Configuration status="INFO">
|
||||||
|
<Properties>
|
||||||
|
<property name="logType">${env:LOGGING_TYPE}</property>
|
||||||
|
</Properties>
|
||||||
<Appenders>
|
<Appenders>
|
||||||
<Console name="JsonConsole" target="SYSTEM_OUT">
|
<Console name="json" target="SYSTEM_OUT">
|
||||||
<JSONLayout compact="true" eventEol="true" properties="true" stacktraceAsString="true"
|
<JSONLayout compact="true" eventEol="true" properties="true" stacktraceAsString="true"
|
||||||
includeTimeMillis="true">
|
includeTimeMillis="true">
|
||||||
|
|
||||||
@ -9,13 +12,12 @@
|
|||||||
</JSONLayout>
|
</JSONLayout>
|
||||||
</Console>
|
</Console>
|
||||||
<Console name="console" target="SYSTEM_OUT">
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
<PatternLayout
|
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n " />
|
||||||
pattern="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
|
|
||||||
</Console>
|
</Console>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Root level="info">
|
<Root level="info">
|
||||||
<AppenderRef ref="console"/>
|
<AppenderRef ref="${logType}"/>
|
||||||
</Root>
|
</Root>
|
||||||
</Loggers>
|
</Loggers>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user