forked from phoenix/litellm-mirror
use prints
This commit is contained in:
parent
63e853e161
commit
1ef814dc97
1 changed files with 5 additions and 11 deletions
|
@ -190,9 +190,7 @@ def setup_admin_ui_on_server_root_path():
|
||||||
build_ui_path = os.path.join(current_dir, "build_ui_custom_path.sh")
|
build_ui_path = os.path.join(current_dir, "build_ui_custom_path.sh")
|
||||||
package_path = os.path.join(current_dir, "package.json")
|
package_path = os.path.join(current_dir, "package.json")
|
||||||
|
|
||||||
verbose_proxy_logger.debug(
|
print(f"Setting up Admin UI on {server_root_path}/ui .......") # noqa
|
||||||
f"Setting up Admin UI on {server_root_path}/ui ......."
|
|
||||||
) # noqa
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Change the current working directory
|
# Change the current working directory
|
||||||
|
@ -212,21 +210,17 @@ def setup_admin_ui_on_server_root_path():
|
||||||
["./build_ui_custom_path.sh", f"{server_root_path}/ui"], check=True
|
["./build_ui_custom_path.sh", f"{server_root_path}/ui"], check=True
|
||||||
)
|
)
|
||||||
|
|
||||||
verbose_proxy_logger.debug("Admin UI setup completed successfully.") # noqa
|
print("Admin UI setup completed successfully.") # noqa
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
verbose_proxy_logger.debug(
|
print(f"An error occurred during the Admin UI setup: {e}") # noqa
|
||||||
f"An error occurred during the Admin UI setup: {e}"
|
|
||||||
) # noqa
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
verbose_proxy_logger.debug(f"An unexpected error occurred: {e}")
|
print(f"An unexpected error occurred: {e}") # noqa
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
# Always return to the original directory, even if an error occurred
|
# Always return to the original directory, even if an error occurred
|
||||||
os.chdir(original_dir)
|
os.chdir(original_dir)
|
||||||
verbose_proxy_logger.debug(
|
print(f"Returned to original directory: {original_dir}") # noqa
|
||||||
f"Returned to original directory: {original_dir}"
|
|
||||||
) # noqa
|
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue