mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-04 14:01:15 +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:
parent
cde8c2d3bd
commit
a2af811ad2
@ -393,7 +393,7 @@ call python --version
|
|||||||
|
|
||||||
@if NOT DEFINED SD_UI_BIND_PORT set SD_UI_BIND_PORT=9000
|
@if NOT DEFINED SD_UI_BIND_PORT set SD_UI_BIND_PORT=9000
|
||||||
@if NOT DEFINED SD_UI_BIND_IP set SD_UI_BIND_IP=0.0.0.0
|
@if NOT DEFINED SD_UI_BIND_IP set SD_UI_BIND_IP=0.0.0.0
|
||||||
@uvicorn server:server_api --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP%
|
@uvicorn server:server_api --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP% --log-level critical
|
||||||
|
|
||||||
|
|
||||||
@pause
|
@pause
|
||||||
|
@ -322,6 +322,6 @@ cd ..
|
|||||||
export SD_UI_PATH=`pwd`/ui
|
export SD_UI_PATH=`pwd`/ui
|
||||||
cd stable-diffusion
|
cd stable-diffusion
|
||||||
|
|
||||||
uvicorn server:server_api --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0}
|
uvicorn server:server_api --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0} --log-level critical
|
||||||
|
|
||||||
read -p "Press any key to continue"
|
read -p "Press any key to continue"
|
||||||
|
@ -8,12 +8,12 @@ from rich.logging import RichHandler
|
|||||||
|
|
||||||
from sd_internal import task_manager
|
from sd_internal import task_manager
|
||||||
|
|
||||||
LOG_FORMAT = '[%(threadName)s] %(message)s'
|
LOG_FORMAT = '%(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.%f",
|
||||||
handlers=[RichHandler(markup=True)]
|
handlers=[RichHandler(markup=True, rich_tracebacks=True, show_level=False)]
|
||||||
)
|
)
|
||||||
|
|
||||||
log = logging.getLogger()
|
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):
|
def make_images(req: Request, data_queue: queue.Queue, task_temp_images: list, step_callback):
|
||||||
try:
|
try:
|
||||||
|
log.info(req)
|
||||||
return _make_images_internal(req, data_queue, task_temp_images, step_callback)
|
return _make_images_internal(req, data_queue, task_temp_images, step_callback)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.error(traceback.format_exc())
|
log.error(traceback.format_exc())
|
||||||
|
@ -19,7 +19,7 @@ from sd_internal import Request, device_manager
|
|||||||
|
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|
||||||
THREAD_NAME_PREFIX = 'Runtime-Render/'
|
THREAD_NAME_PREFIX = ''
|
||||||
ERR_LOCK_FAILED = ' failed to acquire lock within timeout.'
|
ERR_LOCK_FAILED = ' failed to acquire lock within timeout.'
|
||||||
LOCK_TIMEOUT = 15 # Maximum locking time in seconds before failing a task.
|
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.
|
# It's better to get an exception than a deadlock... ALWAYS use timeout in critical paths.
|
||||||
|
Loading…
Reference in New Issue
Block a user