lambda-git icon indicating copy to clipboard operation
lambda-git copied to clipboard

Suppress stdout?

Open scastria opened this issue 6 years ago • 1 comments

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?

scastria avatar Sep 12 '19 21:09 scastria

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

natasha-audrey avatar Nov 18 '19 23:11 natasha-audrey