I want to log some info about gunicorn booting workers and app's unexcepted error, so I add --error-logfile ../log/gunicorn.log
to my gunicorn command.
it worked well when I tested it before production. some line in gunicorn.log
show below:
[2017-12-05 11:07:04 +0800] [6468] [INFO] Starting gunicorn 19.6.0
[2017-12-05 11:07:04 +0800] [6468] [INFO] Listening at: http://0.0.0.0:9999 (6468)
[2017-12-05 11:07:04 +0800] [6468] [INFO] Using worker: gthread
[2017-12-05 11:07:04 +0800] [6471] [INFO] Booting worker with pid: 6471
[2017-12-05 11:07:10 +0800] [6468] [INFO] Handling signal: int
[2017-12-05 11:07:11 +0800] [6471] [INFO] Worker exiting (pid: 6471)
[2017-12-05 11:07:11 +0800] [6468] [INFO] Shutting down: Master
[2017-12-05 11:07:19 +0800] [6484] [INFO] Starting gunicorn 19.6.0
[2017-12-05 11:07:19 +0800] [6484] [INFO] Listening at: http://0.0.0.0:9999 (6484)
[2017-12-05 11:07:19 +0800] [6484] [INFO] Using worker: gthread
[2017-12-05 11:07:19 +0800] [6487] [INFO] Booting worker with pid: 6487
[2017-12-05 11:07:24 +0800] [6484] [INFO] Handling signal: int
[2017-12-05 11:07:24 +0800] [6487] [INFO] Worker exiting (pid: 6487)
[2017-12-05 11:07:25 +0800] [6484] [INFO] Shutting down: Master
After I put it to using in product server. at first, some log actually appeared in gunicorn.log
. But next day, I found gunicorn.log
is completely empty. I make sure that no one have access to this log files, and ll
shows latest updated time at 00:00. I can't figure out what will do this. Anyone knows something about it ?