We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
It seems I am not alone in trying to silence STDOUT output.
The following is an extract of my code:
if success: try: api_connection.start() result = api_request(*args, **kwargs) return True, result except Exception as e: logger.error(f"API request exception:\n{e}") return False, None finally: api_connection.stop() else: logger.error(f"SSH tunnel failed to establish")
When the tunnel fails on api_connection.start() because it is already running, I get an entry in the logs
api_connection.start()
[ERROR] API request exception: ...
but I also get an output to STDOUT even though default logging is set to INFO and I also attempted to add a specific log level for sshtunnel
logging.getLogger('sshtunnel').setLevel(logging.WARNING) logging.getLogger("sshtunnel.SSHTunnelForwarder").setLevel(logging.WARNING)
The output to STDOUT
ERROR | Problem setting SSH Forwarder up: Couldn't open tunnel foo:XX <> bar:XX might be in use or destination not reachable
What can I do for all sshtunnel output to go to logs rather than STDOUT to keep my output informative and clean?
Thanks! Ed
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
It seems I am not alone in trying to silence STDOUT output.
The following is an extract of my code:
When the tunnel fails on
api_connection.start()
because it is already running, I get an entry in the logsbut I also get an output to STDOUT even though default logging is set to INFO and I also attempted to add a specific log level for sshtunnel
The output to STDOUT
What can I do for all sshtunnel output to go to logs rather than STDOUT to keep my output informative and clean?
Thanks!
Ed
The text was updated successfully, but these errors were encountered: