fluent-plugin-record-modifier icon indicating copy to clipboard operation
fluent-plugin-record-modifier copied to clipboard

Single Backslag not able to print into field

Open joaquin386 opened this issue 6 years ago • 1 comments

#TargetUserName and TargetDomainName
<filter log.raw>
  @type record_modifier
  remove_keys _dummy_
  <record>
    _dummy_ ${if record['TargetUserName'] and record['TargetDomainName']; record['TargetDomainUserName'] = "${record['TargetUserName']}\${record['TargetDomainName']}"; end; nil}
  </record>
</filter>

Shows --> "TargetDomainUserName":"Hello#{record['TargetDomainName']}"

"${record['TargetUserName']}\\${record['TargetDomainName']}" 

Shows -> "TargetDomainUserName":"Hello\\World"

So there is no way to put a single backslash on the record_modifier

joaquin386 avatar Oct 01 '18 10:10 joaquin386

what is the if else syntax? is it for ruby?

zffocussss avatar Jun 18 '19 10:06 zffocussss