Closed adswa closed 2 years ago
~oh wait, but info
isn't the default log level, right?~
I don't know where and how the default log level is set, but removing any logging config still results in [INFO]
log messages being shown:
(xnat) adina@muninn in /tmp/x on git:master
❱ git config --list | grep level
(xnat) adina@muninn in /tmp/x on git:master
❱ datalad xnat-init https://xnat.kube.fz-juelich.de 1 !
[INFO ] Authenticating to https://xnat.kube.fz-juelich.de
No project name specified. The following projects are available on https://xnat.kube.fz-juelich.de for user a.wagner:
1000BRAINS
3T_invivo
[...]
makes sense, thanks
I have switched to log the query for projects instead. Is this better? (I can rebase and force push if its okay, but happy to add other logging elsewhere)
My rational to add this is UX-based: When running "datalad xnat-init" it can take a while for the command to finish the query. Without any change to the log level, there is nothing that the user is seeing - the command just sits there and does not return until the query is finished. Notifying the user about the process of authentication is a quick feedback that there indeed is something happening.
Here's a gif before and after the change:![ux](https://user-images.githubusercontent.com/29738718/135414786-40337c73-1a48-4643-910b-e5d2113085da.gif)