ideonate/jhsingle-native-proxy

Exposing some logs from the process being proxied

igozali opened this issue · 2 comments

Hi, thanks for writing this very useful utility! I had a question/feature request, hopefully this is not too bad of a place to submit it.

Right now, I've successfully used jhsingle-native-proxy to serve a notebook via Voila behind JupyterHub, and this is really nice as it allows me to take advantage of JupyterHub's authentication mechanism before allowing access to the Hub-managed service.

I was wondering if there's a good way to expose some of the logs of the process being proxied. Right now, in jhsingle-native-proxy, I see the --debug flag, which will set both the tornado app_log level to DEBUG, and pass debug=True to the tornado Application.

Would it be possible to get INFO level logs though? Right now, if I don't set the --debug argument, then all of my Voila logs seems to get swallowed by the proxy, but if I use the --debug flag, then it logs too much information.

Thank you for this suggestion. Of course it is up to you whether to pass --debug all the way through to Voilà or not, but the --debug to jhsingle-native-proxy itself (and how to handle output from the sub-process e.g. Voilà) is definitely something that can be improved. Maybe it should be possible to instruct it to pass through all output from the sub-process or not. The level of logging from jhsingle-native-proxy itself could be controlled independently perhaps.

Anyway, yes, this is something I would like to look at in more detail. Thanks again for the ideas.

Thanks again for this suggestion. In version 0.6.0, just released, the default is to pass through logs from the subprocess, and this can be switched off by passing --no-logs.