fix: ngrok logging does not use the shared logger module (#5570)

This commit is contained in:
Devin Roark 2024-02-25 00:35:59 -05:00 committed by GitHub
parent 32ee5504ed
commit e0fc808980
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,6 @@
# See this example for full list of options: https://github.com/ngrok/ngrok-py/blob/main/examples/ngrok-connect-full.py # See this example for full list of options: https://github.com/ngrok/ngrok-py/blob/main/examples/ngrok-connect-full.py
# or the README.md in this directory. # or the README.md in this directory.
import logging
from modules import shared from modules import shared
# Pick up host/port command line arguments # Pick up host/port command line arguments
@ -31,6 +30,6 @@ def ui():
try: try:
import ngrok import ngrok
tunnel = ngrok.connect(**options) tunnel = ngrok.connect(**options)
logging.info(f"Ingress established at: {tunnel.url()}") shared.logger.info(f"Ingress established at: {tunnel.url()}")
except ModuleNotFoundError: except ModuleNotFoundError:
logging.error("===> ngrok library not found, please run `pip install -r extensions/ngrok/requirements.txt`") shared.logger.error("===> ngrok library not found, please run `pip install -r extensions/ngrok/requirements.txt`")