mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
log commands before they start (at debug level)
so you know what you're waiting for
This commit is contained in:
@@ -25,10 +25,11 @@ def run_subprocess(cmd, *args, **kwargs):
|
||||
and failed output directly to the user's screen
|
||||
"""
|
||||
logger = logging.getLogger("tljh")
|
||||
printable_command = " ".join(cmd)
|
||||
logger.debug("Running %s", printable_command)
|
||||
proc = subprocess.run(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, *args, **kwargs
|
||||
)
|
||||
printable_command = " ".join(cmd)
|
||||
if proc.returncode != 0:
|
||||
# Our process failed! Show output to the user
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user