# Ignoring leading Whitespace?

**URL:** <https://community.graylog.org/t/ignoring-leading-whitespace/3708>\
**Category:** Graylog Central (peer support)\
**Tags:** sidecar, nxlog, nodatanx\
**Created:** [January 5, 2018, 12:03pm UTC](https://community.graylog.org/t/ignoring-leading-whitespace/3708 "2018-01-05T12:03:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hazmes](https://avatars.discourse-cdn.com/v4/letter/h/e56c9b/32.png) [@Hazmes](https://community.graylog.org/u/Hazmes)\
**Post date:** [January 5, 2018, 12:03pm UTC](https://community.graylog.org/t/ignoring-leading-whitespace/3708/1 "2018-01-05T12:03:26Z")

</div>

Hi,

I am currently sending Log Data to Graylog via NXlog. Some log Messages have leading Whitespaces. When I look these messages up, the whitespace is gone.

Does Graylog or NXlog ignore leading whitespace or both?  
Can I change this somehow?

Currently Using 2.3.2, _Tegernseer_ if it is important.

Thanks.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [January 5, 2018, 12:18pm UTC](https://community.graylog.org/t/ignoring-leading-whitespace/3708/2 "2018-01-05T12:18:59Z")

</div>

> [@Hazmes](#):
>
> Does Graylog or NXlog ignore leading whitespace or both?

Graylog trims the received messages (i. e. removes leading and trailing whitespace characters).

> <https://github.com/Graylog2/graylog2-server/blob/2.4.0/graylog2-server/src/main/java/org/graylog2/plugin/Message.java#L369>

> [@Hazmes](#):
>
> Can I change this somehow?

No, that’s currently not possible.

Feel free to create a feature request at [Issues · Graylog2/graylog2-server · GitHub](https://github.com/Graylog2/graylog2-server/issues/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [January 19, 2018, 12:19pm UTC](https://community.graylog.org/t/ignoring-leading-whitespace/3708/3 "2018-01-19T12:19:10Z")

</div>

Closed on January 19, 2018, 12:19pm UTC

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