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

Make netpyne less verbose #619

Open
lakesare opened this issue Jul 13, 2021 · 0 comments · May be fixed by #623
Open

Make netpyne less verbose #619

lakesare opened this issue Jul 13, 2021 · 0 comments · May be fixed by #623

Comments

@lakesare
Copy link

Please describe the new feature you'd like to see.

Hi! I'd like disable all informational netpyne print() statements.
Right now I resort to suppressing standard output (e.g. when I use netpyne with sciunit):

image

Describe the solution you'd like

I'd like netpyne to use the logging package instead of prints, as in:

import logging
logger = logging.getLogger('netpyne')
logger.info("Something happened")

So that a user can disable it with:

import logging
logging.getLogger('netpyne').setLevel(logging.WARNING)

Describe alternatives you've considered

Another good option is to make wider use of sim.cfg.verbose, though it may be hard to track whether all print statements are preceeded with if sim.cfg.verbose:, and users will have to use netpyne's verbose option instead of the standard getLogger().setLevel().

@lakesare lakesare changed the title Make netpyne les verbose Make netpyne less verbose Jul 13, 2021
@lakesare lakesare linked a pull request Aug 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant