Disable Log4j rotation


(Clement Ros) #1

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 ?


(Christoph) #2

How would you like to log instead?


(Clement Ros) #3

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


(Nik Everett) #4

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.


(Clement Ros) #5

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


(Christoph) #6

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.


(Clement Ros) #7

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.


(system) #8

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