Elasticsearch Windows Service - redirect stdout to null

Hi All,

I'm running Elasticsearch 5.5.1 as a Windows Service which is working fine. However, the service is writing to STDOUT, and this log file only seems to get written when the service is stopped. Depending on how long the service has been running (and how busy it's been) this log file can end up being pretty large.

I can see that there is an option within the ElasticSearch Service Manager to set STDOUT to get written directly to a file. This is OK, but this file would still continue to grow in size over time.

Can anyone advise whether there is a way to either:

Switch off STDOUT or redirect it to null
Configure the service so that the log file holding STDOUT is rolled according to some sort of schedule (daily, file-size based etc.).

Apologies in advance if this information is already available somewhere - I didn't appear to be able to find it.


Hey @stevedearl,

You can configure log file location in addition to how log4j, the logging library used in Elasticsearch, should be configured, including rollover strategies.

Hi Forloop,

Thanks for the update. I'll take a look but that sounds like it would be the solution. I'd forgotten it was based on log4j....


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