title: NLog Conditional Variable Value
body: <p>In NLog, is there a way to have a variable with a conditional value?  I've seen this: <a href="https://github.com/NLog/NLog/wiki/When-Layout-Renderer" rel="nofollow noreferrer">https://github.com/NLog/NLog/wiki/When-Layout-Renderer</a> and tried the following:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;variable name="EnvironmentString" value="${when:when='${IsProd}' == 'true':Prod:else:Stage}"/&gt;
  </code></pre>
  
  <p>but the value is just returned as a literal; the logic is not being processed.</p>
  
  <p>Thanks,</p>