I use logrotate to rotate my logs.  It has settings to control how often
you rotate the logs which include daily, weekly, monthly, etc...  Here's a
copy of my logrotate config file:

"/var/log/uwsgi/*.log" "/var/log/uwsgi/*/*.log" {
  copytruncate
  rotate 52
  weekly
  compress
  delaycompress
  missingok
  notifempty
}

It's just a simple text file stored at /etc/logrotate.d/uwsgi

I think 'copytruncate' is considered the "best" method for rotating the
logs so far.  It makes a duplicate of the log files up until the last entry
before the rotate started, then it truncates the original file removing all
the entries that were copied over.  There are other methods, but
'copytruncate' is also the easiest.



On 7 September 2015 at 03:50, 月忧茗 <[email protected]> wrote:

>
> can uWSGI rotate log by day ?
> or by week ?
>
>
> --
> My GitHub
> https://github.com/yueyoum
>
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to