# Elasticsearch log output not working

**URL:** <https://discuss.elastic.co/t/elasticsearch-log-output-not-working/10742>\
**Category:** Elasticsearch\
**Created:** [February 14, 2013, 12:19pm UTC](https://discuss.elastic.co/t/elasticsearch-log-output-not-working/10742 "2013-02-14T12:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![james\_lewis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_lewis/32/2296_2.png) [@james\_lewis](https://discuss.elastic.co/u/james_lewis)\
**Post date:** [February 14, 2013, 12:19pm UTC](https://discuss.elastic.co/t/elasticsearch-log-output-not-working/10742/1 "2013-02-14T12:19:07Z")

</div>

I'm pretty sure this is going to come down to something completely  
unrelated to elasticsearch but I'm going to ask the question anyway in the  
hope someone else has seen this behavior!

If I run elasticsearch using the binary in the bin file, logging works - if  
I go to /var/log/elasticsearch (default directory) then the log outputs are  
there as I'd expect. However, when I run elasticsearch using my init.d  
script (which has the same LOG\_DIR - /var/log/elasticsearch) it doesn't  
log. Nothing. If I clear out the directory before I start the service via  
the init.d script, it'll still be empty after it's started / stopped.

The elasticsearch user has rwx permissions on the folder and that's the  
user that the service runs under. I've also searched the box for any other  
files with the same name as my logs to see if it outputs somewhere I wasn't  
expecting but nothing.

Any ideas what I've missed or what could be wrong?

Cheers,  
James

## --

This email, including attachments, is private and confidential. If you have  
received this email in error please notify the sender and delete it from  
your system. Emails are not secure and may contain viruses. No liability  
can be accepted for viruses that might be transferred by this email or any  
attachment. Any unauthorised copying of this message or unauthorised  
distribution and publication of the information contained herein are  
prohibited. 7digital Limited. Registered office: Unit F, Lower Ground  
Floor, 5-25 Scrutton Street, Zetland House London EC2A 4HJ. Registered in  
England and Wales. Registered No. 04843573.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![james\_lewis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_lewis/32/2296_2.png) [@james\_lewis](https://discuss.elastic.co/u/james_lewis)\
**Post date:** [February 14, 2013, 1:19pm UTC](https://discuss.elastic.co/t/elasticsearch-log-output-not-working/10742/2 "2013-02-14T13:19:48Z")

</div>

I might be about to answer my own question here...

I replaced our init.d script with the default one that comes with the  
elasticsearch package and logging started working as we expected. I'm yet  
to confirm this but if you set the LOG\_DIR variable in the init.d script  
and also set the path.logs field in the elasticsearch.yml config logging  
doesn't work. Obviously - if you set it the config, why would you set it in  
the init.d!? But still, worth noting in case any of you are as silly as me.

James

## --

This email, including attachments, is private and confidential. If you have  
received this email in error please notify the sender and delete it from  
your system. Emails are not secure and may contain viruses. No liability  
can be accepted for viruses that might be transferred by this email or any  
attachment. Any unauthorised copying of this message or unauthorised  
distribution and publication of the information contained herein are  
prohibited. 7digital Limited. Registered office: Unit F, Lower Ground  
Floor, 5-25 Scrutton Street, Zetland House London EC2A 4HJ. Registered in  
England and Wales. Registered No. 04843573.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:51am UTC](https://discuss.elastic.co/t/elasticsearch-log-output-not-working/10742/3 "2017-07-06T02:51:28Z")

</div>


