fix: logger encoding

This commit is contained in:
Dr.Lt.Data 2023-08-15 23:10:00 +09:00
parent fd666684dd
commit 3cc7bbc600
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@ sys.path.append('../..')
from torchvision.datasets.utils import download_url
# ensure .js
print("### Loading: ComfyUI-Manager (V0.22.2)")
print("### Loading: ComfyUI-Manager (V0.22.3)")
comfy_ui_required_revision = 1240
comfy_ui_revision = "Unknown"

View File

@ -14,9 +14,10 @@ if os.path.exists("comfyui.log"):
original_stdout = sys.stdout
original_stderr = sys.stderr
class Logger:
def __init__(self, filename):
self.file = open(filename, "a")
self.file = open(filename, "w", encoding="utf-8")
def write(self, message):
self.file.write(message)