Disabled all console outputs but still do
AliAtes opened this issue · comments
err_code, stdout, stderr = command_runner(params, timeout=1, encoding='utf-8', method='monitor', live_output=False, stdout=False, stderr=False, split_streams=True)
When timeout prints error to console:
"Timeout 1 seconds expired for command "..." execution. Original output was: None"
How to suspress outputs completely?
The output you're seeing are the logs from command_runner module.
You can silence the module with the following:
from command_runner import command_runner
import logging
logging.getLogger("command_runner").setLevel(logging.CRITICAL)
err_code, stdout, stderr = command_runner(params, timeout=1, encoding='utf-8', method='monitor', live_output=False, stdout=False, stderr=False, split_streams=True)
Version 1.5.0 will have silent=True
parameter which is easier, and doesn't suppress debug messages.