Log commands executed

This commit is contained in:
Anders Ingemann 2013-09-15 17:04:58 +02:00
parent 0eb5eecfc2
commit c917c3bd65

View file

@ -16,6 +16,7 @@ def log_call(command, stdin=None):
from os.path import realpath
command_log = realpath(command[0]).replace('/', '.')
log = logging.getLogger(__name__ + command_log)
log.debug('Executing: {command}'.format(command=' '.join(command)))
if stdin is not None:
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)