# How to dump elasticsearch logs to a file, with or without rotation?

**URL:** <https://discuss.elastic.co/t/how-to-dump-elasticsearch-logs-to-a-file-with-or-without-rotation/85234>\
**Category:** Elasticsearch\
**Created:** [May 10, 2017, 11:34am UTC](https://discuss.elastic.co/t/how-to-dump-elasticsearch-logs-to-a-file-with-or-without-rotation/85234 "2017-05-10T11:34:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [May 10, 2017, 11:34am UTC](https://discuss.elastic.co/t/how-to-dump-elasticsearch-logs-to-a-file-with-or-without-rotation/85234/1 "2017-05-10T11:34:32Z")

</div>

Hi,

I am using ELK GA 5.0.0 in my linux box. Right now, I am starting elasticsearch in background, using command;

```
nohup ./elasticsearch &

```

but, i want this to log to a file. I have created a log folder ouside elasticsearch folder. From bin folder, I can navigate to it like;

```
../../logs

```

Right now, my traces are there in `nohup.out` file, without rotation. I would like to log elasticsearch events (now coming in nohup.out) to a file in the logs folder like `elasticsearch.log`, `elasticsearch.log.1` etc. Is this possible? How can I do this?

thanks in advance.. 🙂

---

<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:** [June 7, 2017, 11:40am UTC](https://discuss.elastic.co/t/how-to-dump-elasticsearch-logs-to-a-file-with-or-without-rotation/85234/2 "2017-06-07T11:40:03Z")

</div>

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