# Elasticsearch 5.5 custom logs directory error: Unable to create logger at ''

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-5-custom-logs-directory-error-unable-to-create-logger-at/95911>\
**Category:** Elasticsearch\
**Created:** [August 4, 2017, 3:10pm UTC](https://discuss.elastic.co/t/elasticsearch-5-5-custom-logs-directory-error-unable-to-create-logger-at/95911 "2017-08-04T15:10:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)\
**Post date:** [August 4, 2017, 3:10pm UTC](https://discuss.elastic.co/t/elasticsearch-5-5-custom-logs-directory-error-unable-to-create-logger-at/95911/1 "2017-08-04T15:10:16Z")

</div>

I try to install elasticsearch as Windows service. I set the environment variables to change the data and logs path with DATA\_DIR and LOG\_DIR.

If the LOG\_DIR is not created yet, and it is only 1 level, the directory will be created (as expected).  
The problem is when I specify LOG\_DIR with nested directory and the directory doesn't exist yet, it will throw error:  
Unable to create logger at ''  
For example:  
LOG\_DIR=D:/test/logs  
If this location doesn't exist, the error will occur.

Is there any way to tell ES to create the directory recursively?  
Thank you!

---

<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:** [September 1, 2017, 3:10pm UTC](https://discuss.elastic.co/t/elasticsearch-5-5-custom-logs-directory-error-unable-to-create-logger-at/95911/2 "2017-09-01T15:10:17Z")

</div>

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