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

Logging an object's internal state #137

Open
jimc101 opened this issue Nov 27, 2023 · 0 comments
Open

Logging an object's internal state #137

jimc101 opened this issue Nov 27, 2023 · 0 comments

Comments

@jimc101
Copy link
Member

jimc101 commented Nov 27, 2023

To assist with debugging, it would be helpful if it was possible to log the internal state of an object. This could be done through a new method which writes the value of class member variables to a log file (e.g. using the logging package). Similar functionality could also be implemented in each object's __init__ method; however, this would be more difficult to control. If done using a new method, a series of log calls could be made from the run method in objects of type Simulator. log_level could be used to control if this information is recorded or not.

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

1 participant