mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Merge pull request #1742 from ysymi/1739-optmize-logging-reopen-files
Optimize the reopen_files by using FileHandler's method: close & _open
This commit is contained in:
commit
54e3b05e33
@ -377,9 +377,8 @@ class Logger(object):
|
||||
handler.acquire()
|
||||
try:
|
||||
if handler.stream:
|
||||
handler.stream.close()
|
||||
handler.stream = open(handler.baseFilename,
|
||||
handler.mode)
|
||||
handler.close()
|
||||
handler.stream = handler._open()
|
||||
finally:
|
||||
handler.release()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user