PlasmaControl / DESC

Stellarator Equilibrium and Optimization Suite
MIT License
87 stars 22 forks source link

Add more detailed logging info #135

Open f0uriest opened 3 years ago

f0uriest commented 3 years ago

We currently have 3 different verbosity levels but stuff is always just printed to the terminal. We might consider using pythons built in logging module (https://docs.python.org/3/howto/logging.html) to get more detailed info, like monitoring each time things are computed or compiled etc. Also having it automatically log to a file might be useful, as well as having it keep track of things that happen even if the user sets verbose=0, so that they could go back later to see what was happening under the hood if things go wrong

MothVine commented 2 years ago

Hmm, I'll take a look at getting log files set up this weekend. Tracking logging regardless of verbiosity seems like a good idea, though I wouldn't want the user to have a log file they view as important, set verbiosity to 0 so that it doesn't get overwritten, and then have it get overwritten anyways. But appending to a log file indefinitely also seems like a bad solution.

dpanici commented 2 months ago

Would want to try to use JAX debugging statements to get info from inside Jitted functions