I want to use the logback variable substitution feature. Unfortunately it does not work as expected.
Logback.xml
<?xml` version="1.0" encoding="UTF-8"?>
<configuration debug="true">
<property scope="context" name="ENV" value="${logging.application.environment}" />
...
<appender name="LogzioLogbackAppender" class="io.logz.logback.LogzioLogbackAppender">
<token>LOGZIO_TOKEN</token>
<logzioUrl>${logging.logzio.url}</logzioUrl>
<additionalFields>env=${logging.application.environment}</additionalFields>
<additionalFields>ENV=${ENV}</additionalFields>
</appender>
<root level="info">
<appender-ref ref="Console"/>
<if condition='!property("ENV").contains("dev")'>
<then>
<appender-ref ref="LogzioLogbackAppender"/>
</then>
</if>
</root>
<!-- Use shutdownHook so that we can close gracefully and finish the log drain -->
<shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/>
</configuration>
When running I saw that the value was "logging.application.environment_IS_UNDEFINED".
I would expect it would say "dev"like the other additional property.
Hello,
I want to use the logback variable substitution feature. Unfortunately it does not work as expected.
Logback.xml
When running I saw that the value was "logging.application.environment_IS_UNDEFINED". I would expect it would say "dev"like the other additional property.