<div dir="auto">You have bash-like ${foo:-alternative value} syntax in templates.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 5, 2019, 00:56 Ronald Fenner <<a href="mailto:rfenner@gamecircus.com">rfenner@gamecircus.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div>I generate a Kafka topic to send the message to by doing: <span style="background-color:rgb(35,37,37);color:rgb(169,183,198);font-family:Menlo;font-size:9pt">topic("${topic}.${environment}")</span><div>What I'd like to do if the field wasn't in the json message to provide a default value. </div><div><br></div><div>Im looking for like a tertiary operator to use In the topic or perhaps a rewrite rule.</div><div><br></div><div>I see the conditional expressions but from the docs it doesn't look like I can use it in the topic or a rewrite rule</div><div>NOTE: My messages are json stings that get parsed and then imploded back to json as it's sent.</div><div><br></div><div>Thanks</div><div><br></div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><div>Ronald Fenner</div><div>Network Architect</div><div>Game Circus LLC.</div></div><div><br></div><div><a href="mailto:rfenner@gamecircus.com" target="_blank" rel="noreferrer">rfenner@gamecircus.com</a></div></div></div></div>
</div>
<br></div>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>