diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2016-02-14 16:13:16 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2016-02-14 16:52:00 +0100 |
commit | f3ef6666635bc89b0983abccdd45e7596ab67bc2 (patch) | |
tree | 004792bcc22cfd09bfa85cf0283e08b164a070ee /fuse-httpfs | |
parent | f23009fd2f79a8c7101ed82b28f9ae2d5c7c8149 (diff) | |
download | fuse-httpfs-f3ef6666635bc89b0983abccdd45e7596ab67bc2.tar.gz fuse-httpfs-f3ef6666635bc89b0983abccdd45e7596ab67bc2.zip |
add flag for requests debug logging
Diffstat (limited to 'fuse-httpfs')
-rwxr-xr-x | fuse-httpfs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fuse-httpfs b/fuse-httpfs index aa68cf6..0963501 100755 --- a/fuse-httpfs +++ b/fuse-httpfs @@ -16,7 +16,10 @@ p.add_argument("--max_background", type=int, default=15, help="Maximum number of background threads") p.add_argument("--no_foreground", action="store_true", default=False, help="Fork into background as a daemon") -p.add_argument("--debug", action="store_true", help="Enable fuse debug") +p.add_argument("--debug", action="store_true", + help="Enable debug logging") +p.add_argument("--debug-requests", action="store_true", + help="Enable python-requests debug logging") p.add_argument("--nothreads", action="store_true", help="Disable fuse threads") p.add_argument("--timeout", type=float, default=None, @@ -37,8 +40,9 @@ if not args.pop("no_foreground"): kwargs["foreground"] = True if args.pop("debug"): kwargs["debug"] = True - print(httpfs.__name__) logging.getLogger(httpfs.__name__).setLevel(logging.DEBUG) +if args.pop("debug_requests"): + logging.getLogger("requests.packages.urllib3").setLevel(logging.DEBUG) kwargs.update(args) fuse = fuse.FUSE(httpfs.Httpfs(), httpfs.Config.mountpoint, **kwargs) |