mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Chore: [ALAS] Patch uiautomator2 loggers so they can be logged in Alas
This commit is contained in:
parent
24fbff17ef
commit
f959b090f0
@ -56,6 +56,22 @@ RETRY_DELAY = 3
|
||||
# Patch uiautomator2 appdir
|
||||
u2.init.appdir = os.path.dirname(uiautomator2cache.__file__)
|
||||
|
||||
# Patch uiautomator2 logger
|
||||
u2_logger = u2.logger
|
||||
u2_logger.debug = logger.info
|
||||
u2_logger.info = logger.info
|
||||
u2_logger.warning = logger.warning
|
||||
u2_logger.error = logger.error
|
||||
u2_logger.critical = logger.critical
|
||||
|
||||
|
||||
def setup_logger(*args, **kwargs):
|
||||
return u2_logger
|
||||
|
||||
|
||||
u2.setup_logger = setup_logger
|
||||
u2.init.setup_logger = setup_logger
|
||||
|
||||
|
||||
def is_port_using(port_num):
|
||||
""" if port is using by others, return True. else return False """
|
||||
|
Loading…
Reference in New Issue
Block a user