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

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.. :slight_smile:

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