# Elasticsearch name of log file

**URL:** <https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876>\
**Category:** Elasticsearch\
**Created:** [June 9, 2019, 1:42pm UTC](https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876 "2019-06-09T13:42:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 9, 2019, 1:42pm UTC](https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876/1 "2019-06-09T13:42:26Z")

</div>

Hi Elasticians,  
is it possible to force name of log file of elasticsearch instance in elasticsearch.yml file?

In `elasticsearch.yml` I have:

```
cluster.name: name-of-cluster
path.logs: /var/log/elasticsearch

```

Resulted name of log file is: `name-of-cluster.log`  
Full path of log file: `/var/log/elasticsearch/name-of-cluster.log`

I would like to force to this regardless of `node.name`:  
**/var/log/elasticsearch/elasticsearch.log**

Regards,  
Vasek

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 9, 2019, 4:37pm UTC](https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876/2 "2019-06-09T16:37:02Z")

</div>

Wondering if you can do that by changing the log4j configuration file...

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 17, 2019, 6:56am UTC](https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876/3 "2019-06-17T06:56:23Z")

</div>

Hello,  
yes. Thank you. It works fine!

---

<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:** [July 15, 2019, 6:56am UTC](https://discuss.elastic.co/t/elasticsearch-name-of-log-file/184876/4 "2019-07-15T06:56:24Z")

</div>

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