New line in collector snippet

Hello I’m trying to add new custom field to winlogbeat. Following is the snippet I’m trying but instead of new line it literally printing “\n”

{{if .Windows}}
  - name: CustomLog
\n   fields:
\n	  app:'winlogbeat'

How can i print new line into winlogbeat config?

Did you ever figure this out; I’m having the same issue?

have you checked the output in eg. notepad++, windows notepad doesn’t support \n, only with \r

Please create a bug report for this at