lambda-git
lambda-git copied to clipboard
Suppress stdout?
I am passing my credentials in the git url when I call git clone. However, lambda-git is logging it back to stdout and revealing my credentials. Is there a way to suppress stdout logging for 1 git.exec_command invocation?
If you add
logger = logging.getLogger('git')
logger.setLevel(logging.WARNING)
git.exec_command("clone", ...)
logger.setLevel(logging.INFO)
you can disable the logger for INFO - disabling the output for successful calls. There still needs to be a solution to not output the args when the command fails - but this will at least stop it in logs with successes