I have running uwsgi server. i need log rotation for daily and file size based log rotation.
uwsgi configuration:
# file: /etc/init/uwsgi.conf
description "uWSGI starter"
start on (local-filesystems and runlevel [2345])
stop on runlevel [016]
respawn
# home - is the path to our virtualenv directory
# pythonpath - the path to our django application
# module - the wsgi handler python script
exec /home/testuser/virtual_environments/teatapp/bin/uwsgi \
--uid testuser \
--home /home/testuser/virtual_environments/teatapp \
--pythonpath /home/testuser/sci-github/teatapp\
--socket /tmp/uwsgi.sock \
--chmod-socket \
--module wsgi \
--logdate \
--optimize 2 \
--processes 2 \
--master \
--logto /var/log/uwsgi/uwsgi.log
logrotate configuration:
# file : /etc/logrotate.conf
"/var/log/uwsgi/*.log" {
copytruncate
daily
maxsize 5k
dateext
rotate 5
compress
missingok
create 777 root root
}
But log rotation is not working please give the solution for if any wrong configuration in logrotaion.conf.