Disable Log4j rotation

Hi,

I use Elasticsearch 5.1.

I want to disable the rotation of Elasticsearch log file made by Log4j but i don't know how log4j work so i ask here.

How can i do that ?

How would you like to log instead?

I don't want to stop the log, i want to stop the rotation of the log file.

There should be a log4j2.properties file in the config directory or /etc/elasticsearch if you installed via RPM or DEB. Here are the docs for that.

Yes, i saw that file, but I do not know what parameter I have to comment to disable the rotation of the log file.

Hi,

What I meant was: if you want to stop rotation of the log file, what behaviour do you want instead? One large file that always grows bigger? Create log files and roll over but never delete the old ones?
There are various options and to decide which ones to choose it's necessary to describe the behaviour you want.

I want to use Logrotate to do the rotation of the file.
I want 1 file per day.
The file of two days ago must be compressed and sent via rsync on a remote server.
I know how to do that with logrotate, i just want to disable the log4j rotation, to not have 2 services who make the rotation.

1 Like

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