mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Allow logging to server log from show_error_notification
This commit is contained in:
@@ -768,7 +768,10 @@ api_v1 = KoboldAPISpec(
|
||||
tags=tags,
|
||||
)
|
||||
|
||||
def show_error_notification(title: str, text: str) -> None:
|
||||
def show_error_notification(title: str, text: str, do_log: bool = False) -> None:
|
||||
if do_log:
|
||||
logger.error(f"{title}: {text}")
|
||||
|
||||
if has_request_context():
|
||||
socketio.emit("show_error_notification", {"title": title, "text": text}, broadcast=True, room="UI_2")
|
||||
else:
|
||||
|
Reference in New Issue
Block a user