I trust you all doing good.
we planning to implement log rotation for below file.
stdout.log
we use below log rotation configuration file.
/usr/local/rms/kafka/kafka-connect-fluentd/stdout.log {
daily
rotate 7
maxsize 100M
minsize 10M
copytruncate
delaycompress
compress
notifempty
missingok
}
we have noticed the file is rotating and file is truncated.But application does not write logs to new file. we tried to send the HUP signal and it did not work.
-rw-r--r-- 1 appuser appuser 8.2M Feb 20 03:11 stdout.log.4.gz
-rw-r--r-- 1 appuser appuser 4.0M Feb 20 23:48 stdout.log.3.gz
-rw-r--r-- 1 appuser appuser 7.6M Feb 20 23:49 stdout.log.2.gz
-rw-r--r-- 1 appuser appuser 2.1G Feb 21 03:39 stdout.log.1
-rw-r--r-- 1 appuser appuser 2.2G Feb 21 14:15 stdout.log
The application itself do not have a reload option, We stop the application and start the application when we need to reload or restart the application.
we use below command to bring up the application
nohup connect-standalone ${BASE}/connect-standalone.properties
${BASE}/FluentdSourceConnector.properties >& ${BASE}/stdout.log &
we use below command to kill the application
kill -9 <processid>
How do we implement a log rotating mechanism for this situation ?