mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-27 09:28:56 +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
|
||||
|
||||
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()
|
||||
|
@ -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')
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user