mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-28 18:08:54 +01:00
Tweak logging to increase the space available by 3 characters
This commit is contained in:
parent
a2af811ad2
commit
543f13f9a3
@ -8,12 +8,12 @@ from rich.logging import RichHandler
|
|||||||
|
|
||||||
from sd_internal import task_manager
|
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(
|
logging.basicConfig(
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
format=LOG_FORMAT,
|
format=LOG_FORMAT,
|
||||||
datefmt="%X.%f",
|
datefmt="%X",
|
||||||
handlers=[RichHandler(markup=True, rich_tracebacks=True, show_level=False)]
|
handlers=[RichHandler(markup=True, rich_tracebacks=True, show_time=False, show_level=False)]
|
||||||
)
|
)
|
||||||
|
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
@ -149,7 +149,7 @@ def getModels():
|
|||||||
listModels(model_type='vae')
|
listModels(model_type='vae')
|
||||||
listModels(model_type='hypernetwork')
|
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
|
# legacy
|
||||||
custom_weight_path = os.path.join(app.SD_DIR, 'custom-model.ckpt')
|
custom_weight_path = os.path.join(app.SD_DIR, 'custom-model.ckpt')
|
||||||
|
@ -5,6 +5,7 @@ Notes:
|
|||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
import logging
|
import logging
|
||||||
|
import datetime
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
from fastapi import FastAPI, HTTPException
|
from fastapi import FastAPI, HTTPException
|
||||||
@ -17,6 +18,7 @@ from sd_internal import app, model_manager, task_manager
|
|||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|
||||||
log.info(f'started in {app.SD_DIR}')
|
log.info(f'started in {app.SD_DIR}')
|
||||||
|
log.info(f'started at {datetime.datetime.now():%x %X}')
|
||||||
|
|
||||||
server_api = FastAPI()
|
server_api = FastAPI()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user