1
我正在嘗試在logback配置中使用janino條件語句,並且它可以正常使用「if」和「else」。但是我想問一下是否有可能在其中寫入「else if」?「else if」in janino logback configuration
我的情況 -
<if condition='p("log.environment").equals("prod")'>
<then>
<include file="${LOG_CONFIG_DIR}/logback-prod.xml" />
</then>
</if>
<if condition='p("log.environment").equals("uat")'>
<then>
<include file="${LOG_CONFIG_DIR}/logback-uat.xml" />
</then>
</if>
<if condition='p("log.environment").equals("dev")'>
<then>
<include file="${LOG_CONFIG_DIR}/logback-dev.xml" />
</then>
</if>