Mercurial > silorider
changeset 37:b2cacc853680
Disable debug logging for requests_oauthlib
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 21 May 2023 09:39:35 -0700 |
parents | 8e8541ef85b7 |
children | 0f98784bcc40 |
files | silorider/main.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/silorider/main.py Sun May 21 09:18:20 2023 -0700 +++ b/silorider/main.py Sun May 21 09:39:35 2023 -0700 @@ -147,6 +147,14 @@ for handler in root_logger.handlers: handler.setLevel(loglvl) + if args.verbose: + # Specifically don't enable debug logging for requests' OAuth + # lib because it prints out large chunks of binary payloads. + req_logger = logging.getLogger('requests_oauthlib') + req_logger.setLevel(logging.INFO) + for handler in req_logger.handlers: + handler.setLevel(logging.INFO) + if not getattr(args, 'func', None): parser.print_help() return