improved subprocess cmd logging

This commit is contained in:
Maxim Devaev
2022-06-19 20:56:51 +03:00
parent 0edf854832
commit 43da6af153
5 changed files with 8 additions and 6 deletions

View File

@@ -131,7 +131,7 @@ class _Service: # pylint: disable=too-many-instance-attributes
async def __run_ctl(self, ctl: BaseCtl, direct: bool) -> bool:
logger = get_logger()
cmd = ctl.get_command(direct)
logger.info("CMD: %s", " ".join(cmd))
logger.info("CMD: %s", tools.cmdfmt(cmd))
try:
return (not (await aioproc.log_process(cmd, logger)).returncode)
except Exception as err: