# Log message encoding of \\n for multiline output

**URL:** <https://discuss.elastic.co/t/log-message-encoding-of-n-for-multiline-output/249687>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 23, 2020, 5:35pm UTC](https://discuss.elastic.co/t/log-message-encoding-of-n-for-multiline-output/249687 "2020-09-23T17:35:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbrisso](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kbrisso](https://discuss.elastic.co/u/kbrisso)\
**Post date:** [September 23, 2020, 5:35pm UTC](https://discuss.elastic.co/t/log-message-encoding-of-n-for-multiline-output/249687/1 "2020-09-23T17:35:21Z")

</div>

Hello All-

In my messages, some of the log messages actually have \n in the log output itself along with other random characters like XML tags. Is there a way to encode \n in file beat before shipping to log stash so the grok process doesn't split this into multiple messages? I am able to parse this as mutiline and grok the input in log stash. But the issue is embedded \n in the log output.

I was looking at this setting in file beat:

```auto
  # Configure the file encoding for reading files with international characters
  # following the W3C recommendation for HTML5 (http://www.w3.org/TR/encoding).
  # Some sample encodings:
  # plain, utf-8, utf-16be-bom, utf-16be, utf-16le, big5, gb18030, gbk,
  # hz-gb-2312, euc-kr, euc-jp, iso-2022-jp, shift-jis, ...
  #encoding: plain

```

```auto
[DEBUG] 2020-09-23 08:50:36,248[ajp-nio-9031-exec-9] CUSTOMIZATION - [ThingWatchListTag][fetchWatchListDetailsForUser][ThingWatchListTag getWatchListDetailsForUser()] olio key : \n com.grk.id.wsc.olio.value.olioKeyVO@2d51e371\n
[
  actorID=<null>\n
  actorType=FTE\n
  asn=<null>\n
  filterType=DealerNo\n
  giin=<null>\n
  cIPSearch=<null>\n
  pagination=<null>
  thingIDType=<null>\n
  strtIndx=<null>\n
  realTimeFlag=true\n
  requestParams={}\n
  uid=<null>\n
  uidType=<null>\n
  userLoginID=jjones\n
  referenceIDTable={}\n
  callerName=<null>\n
  callerPhone=<null>\n
  wirn=<null>\n
  pega=<null>\n
  rdChoice=<null>\n
  reqTypeSAT=<null>\n
  reqDateSAT=<null>\n
]

```

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 21, 2020, 7:35pm UTC](https://discuss.elastic.co/t/log-message-encoding-of-n-for-multiline-output/249687/2 "2020-10-21T19:35:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
