Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Maybe a bug of reopen_files when handle signal USR1 ？ #1739
I am sorry I don't know how to discuss on mailing list.
when gunicorn received signal USR1, my flask app's logger will write log to another file, which is unexpected.
my logger in flask app use handler implemented by myself, and my handler does not open file of handler.baseFilename. when gunicorn worker handle USR1, it will search all logger in that gunicorn worker process and reopen the handler's stream by
To be honest, I do not understand why gunicorn need reopen all logger in a python process , shouldn’t it pick out only gunicorn's logger ？however, if it's really required, the reopen_files logic must be safe or do not have effect to other logger at least.
I am happy to submit a pr to optimize here :)
I think I agree with that. That would be a small breaking change, so I think I like your other idea. Let's use