# SearchRequestBuilder.toString() : Print Non Pretty way

**URL:** <https://discuss.elastic.co/t/searchrequestbuilder-tostring-print-non-pretty-way/108312>\
**Category:** Elasticsearch\
**Created:** [November 20, 2017, 4:57am UTC](https://discuss.elastic.co/t/searchrequestbuilder-tostring-print-non-pretty-way/108312 "2017-11-20T04:57:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nakshathri](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@Nakshathri](https://discuss.elastic.co/u/Nakshathri)\
**Post date:** [November 20, 2017, 4:57am UTC](https://discuss.elastic.co/t/searchrequestbuilder-tostring-print-non-pretty-way/108312/1 "2017-11-20T04:57:37Z")

</div>

Hello There,

We are using fluentd to analyse our application logs and have difficulties in parsing the log which gets printed when we use SearchRequestBuilder.toString(). This prints the query in pretty way which makes it difficult to fluentd to parse.

But still, we need this log to be printed but non-pretty way. How can I set the right params to do this?

Regards,  
Manjunath

---

<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:** [December 18, 2017, 4:57am UTC](https://discuss.elastic.co/t/searchrequestbuilder-tostring-print-non-pretty-way/108312/2 "2017-12-18T04:57:44Z")

</div>

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