diff --git a/ui/sd_internal/app.py b/ui/sd_internal/app.py index bfb90399..47a2d610 100644 --- a/ui/sd_internal/app.py +++ b/ui/sd_internal/app.py @@ -8,12 +8,12 @@ from rich.logging import RichHandler from sd_internal import task_manager -LOG_FORMAT = '%(levelname)s %(threadName)s %(message)s' +LOG_FORMAT = '%(asctime)s.%(msecs)03d %(levelname)s %(threadName)s %(message)s' logging.basicConfig( level=logging.INFO, format=LOG_FORMAT, - datefmt="%X.%f", - handlers=[RichHandler(markup=True, rich_tracebacks=True, show_level=False)] + datefmt="%X", + handlers=[RichHandler(markup=True, rich_tracebacks=True, show_time=False, show_level=False)] ) log = logging.getLogger() diff --git a/ui/sd_internal/model_manager.py b/ui/sd_internal/model_manager.py index 827434d7..ebeb439c 100644 --- a/ui/sd_internal/model_manager.py +++ b/ui/sd_internal/model_manager.py @@ -149,7 +149,7 @@ def getModels(): listModels(model_type='vae') listModels(model_type='hypernetwork') - if models_scanned > 0: log.info(f'[green]Scanned {models_scanned} models. 0 infected[/]') + if models_scanned > 0: log.info(f'[green]Scanned {models_scanned} models. Nothing infected[/]') # legacy custom_weight_path = os.path.join(app.SD_DIR, 'custom-model.ckpt') diff --git a/ui/server.py b/ui/server.py index aaa16ce0..1c537dcd 100644 --- a/ui/server.py +++ b/ui/server.py @@ -5,6 +5,7 @@ Notes: import os import traceback import logging +import datetime from typing import List, Union from fastapi import FastAPI, HTTPException @@ -17,6 +18,7 @@ from sd_internal import app, model_manager, task_manager log = logging.getLogger() log.info(f'started in {app.SD_DIR}') +log.info(f'started at {datetime.datetime.now():%x %X}') server_api = FastAPI()