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

Simplify logging configuration #419

Closed
mrossinek opened this issue Nov 8, 2021 · 0 comments · Fixed by #565
Closed

Simplify logging configuration #419

mrossinek opened this issue Nov 8, 2021 · 0 comments · Fixed by #565
Assignees
Labels
type: feature request New feature or request

Comments

@mrossinek
Copy link
Member

What is the expected behavior?

Qiskit Aqua used to provide some simplified means of enabling Python's internal logging for certain modules:

https://github.com/Qiskit/qiskit-aqua/blob/main/qiskit/chemistry/_logging.py#L30-L37

I believe, Qiskit Nature would benefit a lot from a similarly simple configuration setting.
#406 is adding a qiskit_nature.settings object which permits simple global configuration settings. Based on another setting, logging could be configured in a similar manner to how it used to be done in Aqua.

Here are some ideas as to what logging options should be possible (for now at least):

  • set all qiskit_nature logging to a given level
    • (optionally) specify a list of pairs matching logging levels to submodules (not required for now imo)
    • (optionally) support arbitrary logger names in the above list (could be used to easily control logging of other modules like Qiskit Terra, PySCF, etc.)
  • default to a StreamHandler which logs to sys.stdout
    • (optionally) support custom handler addition (FileHandler, RotatingFileHandler, etc.)
    • (optionally) support custom Formatter

More Aqua-related references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants