alexis
alexis

Reputation: 569

How to automatic control uwsgi log size

When my service run in uwsgi for a long time, the log file size grows very large. I want to find a way to automatic control the log size. For example, service in supervisor will cut into several pieces and it reserve the last 10 pieces.

Upvotes: 3

Views: 5698

Answers (2)

warath-coder
warath-coder

Reputation: 2122

You may also want to setup logrotate to keep backups for files (which you can have it compress the rotated log). http://linuxcommand.org/man_pages/logrotate8.html

Upvotes: 1

doniyor
doniyor

Reputation: 37876

you need log-maxsize

[uwsgi]
;...
;...
log-maxsize = 2048

Upvotes: 10

Related Questions