mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-16 02:59:06 +02:00
Disable uvicorn access logging in favor of cleaner server-side logging, we already get all that info; Print the request metadata
This commit is contained in:
@ -8,12 +8,12 @@ from rich.logging import RichHandler
|
||||
|
||||
from sd_internal import task_manager
|
||||
|
||||
LOG_FORMAT = '[%(threadName)s] %(message)s'
|
||||
LOG_FORMAT = '%(levelname)s %(threadName)s %(message)s'
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format=LOG_FORMAT,
|
||||
datefmt="[%X.%f]",
|
||||
handlers=[RichHandler(markup=True)]
|
||||
datefmt="%X.%f",
|
||||
handlers=[RichHandler(markup=True, rich_tracebacks=True, show_level=False)]
|
||||
)
|
||||
|
||||
log = logging.getLogger()
|
||||
|
@ -70,6 +70,7 @@ def reload_models_if_necessary(req: Request):
|
||||
|
||||
def make_images(req: Request, data_queue: queue.Queue, task_temp_images: list, step_callback):
|
||||
try:
|
||||
log.info(req)
|
||||
return _make_images_internal(req, data_queue, task_temp_images, step_callback)
|
||||
except Exception as e:
|
||||
log.error(traceback.format_exc())
|
||||
|
@ -19,7 +19,7 @@ from sd_internal import Request, device_manager
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
THREAD_NAME_PREFIX = 'Runtime-Render/'
|
||||
THREAD_NAME_PREFIX = ''
|
||||
ERR_LOCK_FAILED = ' failed to acquire lock within timeout.'
|
||||
LOCK_TIMEOUT = 15 # Maximum locking time in seconds before failing a task.
|
||||
# It's better to get an exception than a deadlock... ALWAYS use timeout in critical paths.
|
||||
|
Reference in New Issue
Block a user