Skip to content
New issue

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

Default logging level #879

Open
EmmaRenauld opened this issue Jan 17, 2024 · 5 comments
Open

Default logging level #879

EmmaRenauld opened this issue Jan 17, 2024 · 5 comments

Comments

@EmmaRenauld
Copy link
Contributor

Now that we print the scilpy version, something like:

for bundle in *
do 
      echo $bundle
      scil_tractogram_convert.py $bundle bundle.trk
done

Will output:

BPS_left
INFO:root:Scilpy version: 1.7.dev0
BPS_right
INFO:root:Scilpy version: 1.7.dev0
CA
INFO:root:Scilpy version: 1.7.dev0
CC
INFO:root:Scilpy version: 1.7.dev0
Cingulum_left
INFO:root:Scilpy version: 1.7.dev0
Cingulum_right
INFO:root:Scilpy version: 1.7.dev0
CP
INFO:root:Scilpy version: 1.7.dev0
Fornix
INFO:root:Scilpy version: 1.7.dev0
ICP_left
[...]

Which is a little ugly. We should make sure that the version only shows with option -v.

@EmmaRenauld
Copy link
Contributor Author

@frheault You were looking for easy tasks.

@arnaudbore
Copy link
Contributor

arnaudbore commented Jan 19, 2024

I think it may be a little bit more complicated and heavy than anticipated. There is not consensus across scripts on how verbose is used. Adding this in each script implies to duplicate code or to add a function to properly set verbose on each script. 🤔

@EmmaRenauld
Copy link
Contributor Author

Maybe the version could be added as epilog in all argparsers? So it would only print with --help?
(We would need to see what to do when there's already an epilog...)

@karanphil
Copy link
Contributor

Also, a default logging.INFO might be to much verbose... what about logging.WARNING as default? And if you put -v, you then get logging.INFO or DEBUG. I could do a PR for this, looking at every scripts.

@EmmaRenauld
Copy link
Contributor Author

Rapidly, I feel like it's a good option but maybe I don't have all scripts in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants