mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
prefix for log_process()
This commit is contained in:
@@ -79,7 +79,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
||||
return
|
||||
|
||||
try:
|
||||
proc = await aioproc.log_process(self.__cmd, logger=get_logger(0))
|
||||
proc = await aioproc.log_process(self.__cmd, logger=get_logger(0), prefix=str(self))
|
||||
if proc.returncode != 0:
|
||||
raise RuntimeError(f"Custom command error: pid={proc.pid}; retcode={proc.returncode}")
|
||||
except Exception as err:
|
||||
|
||||
@@ -153,7 +153,7 @@ class Plugin(BaseUserGpioDriver): # pylint: disable=too-many-instance-attribute
|
||||
return
|
||||
action = (_OUTPUTS[pin] if pin.isdigit() else pin)
|
||||
try:
|
||||
proc = await aioproc.log_process(**self.__make_ipmitool_kwargs(action), logger=get_logger(0))
|
||||
proc = await aioproc.log_process(**self.__make_ipmitool_kwargs(action), logger=get_logger(0), prefix=str(self))
|
||||
if proc.returncode != 0:
|
||||
raise RuntimeError(f"Ipmitool error: pid={proc.pid}; retcode={proc.returncode}")
|
||||
except Exception as err:
|
||||
|
||||
Reference in New Issue
Block a user