“否则如果”在janino logback配置中

时间:2017-02-21 15:02:38

标签: conditional logback janino

我正在尝试在logback配置中使用janino条件语句,它与“if”和“else”一起工作正常。但我想问一下是否有可能在其中写上“else if”?

我的情况 -

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

2 个答案:

答案 0 :(得分:1)

您可以在多级

中使用<div ng-if="moreVal"> <div data-ng-repeat="vl in vm.valHolder.valArr track by $index"> <p>My Value: {{vl.myVal}}</p> </div>
if-then-else

答案 1 :(得分:0)

尝试这样做。

<if condition=''>
  <then>..</then>
  <else>
    <if condition=''>
      <then>..</then>
      <else>..</else>
    </if>
  </else>
</if>