[#2808] Fix: Deluge Log File Not Working as Intended
This commit is contained in:
parent
2dea6ab5a5
commit
58bc8b6ec7
|
@ -135,10 +135,10 @@ def setup_logger(level="error", filename=None, filemode="w", logrotate=None):
|
||||||
backupCount=5, encoding="utf-8"
|
backupCount=5, encoding="utf-8"
|
||||||
)
|
)
|
||||||
elif filename and filemode == "w":
|
elif filename and filemode == "w":
|
||||||
handler = getattr(
|
handler_cls = logging.FileHandler
|
||||||
logging.handlers, "WatchedFileHandler", logging.FileHandler)(
|
if not common.windows_check():
|
||||||
filename, mode=filemode, encoding="utf-8"
|
handler_cls = getattr(logging.handlers, "WatchedFileHandler", logging.FileHandler)
|
||||||
)
|
handler = handler_cls(filename, mode=filemode, encoding="utf-8")
|
||||||
else:
|
else:
|
||||||
handler = logging.StreamHandler(stream=sys.stdout)
|
handler = logging.StreamHandler(stream=sys.stdout)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue