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

Turn Logger into a container for storing issues that can be returned to user #130

Closed
CiaranWelsh opened this issue Aug 23, 2021 · 2 comments

Comments

@CiaranWelsh
Copy link
Contributor

An API that makes it easy to get a list of issues, the level of each issue, and the message associated with each issue would be helpful. This would avoid the need to setup a log file and then parse the log file for errors. I don't have a strong opinion about exactly what this needs to look like.

Methods such as these would be fine:

  • log.get_num_issues()
  • log.get_issue_level(i_message)
  • log.get_issue_message(i_message)

Here's one example from libCellML: https://libcellml.org/documentation/api/v0.2.0/classlibcellml_1_1Logger.
Another is libSBML: http://sbml.org/Software/libSBML/5.18.0/docs/python-api/classlibsbml_1_1_s_b_m_l_error_log.html.

Originally posted by @jonrkarr in #102 (comment)

@CiaranWelsh
Copy link
Contributor Author

Implemented in v1.2.13. See docs.

@jonrkarr
Copy link
Contributor

This will be very helpful.

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

2 participants