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

Set logger levels to INFO #867

Merged
merged 3 commits into from
Aug 22, 2022
Merged

Conversation

arokem
Copy link
Collaborator

@arokem arokem commented Aug 13, 2022

Particularly for saving of files, so that we get more information about what is being saved and when. Output is more verbose, but that should help with #857, where not a lot of information is provided except for the prog bars.

@36000
Copy link
Collaborator

36000 commented Aug 16, 2022

Should we do this in all files? Is there some way to set this universally or have the user do it?

@36000
Copy link
Collaborator

36000 commented Aug 18, 2022

@arokem maybe we should replace things like

logger = logging.getLogger('AFQ.Segmentation')
logger.info()

with:

logging.info()

This is what dipy uses in most cases, however in some cases they do use getlogger (like stateful tractogram) . For the size of our package I think we may not need to have our own getLogger. What do you think?

@arokem
Copy link
Collaborator Author

arokem commented Aug 18, 2022

I don't have much experience with this. I think that using the logging.info function directly would be fine, so long as we can set the logging levels somewhere global. For example, in the package __init__.py file. And it should be possible to over-ride for users who want less verbose output everywhere.

@36000
Copy link
Collaborator

36000 commented Aug 19, 2022

Trying middle ground, setting everything to 'AFQ' logger. Does this work in the situations where we were having problems?

@36000
Copy link
Collaborator

36000 commented Aug 22, 2022

@arokem if this also solves the problems you were seeing earlier, we can merge this

@arokem
Copy link
Collaborator Author

arokem commented Aug 22, 2022

OK. Let's merge this and adjust if we see this is too verbose or not verbose enough.

@arokem arokem merged commit ec3057b into yeatmanlab:master Aug 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants