Skip to content

Conversation

@eihli
Copy link

@eihli eihli commented Feb 28, 2024

Noticed that the changes you merged in here #1 weren't reflected in the PR you had opened here ManifoldRG#79

Made a few other small changes in the meantime. I'm realizing I shouldn't have made every print statement a logger.whatever statement. Prints are good as a way of interacting with the program the same way you would interact with a GUI (but in this case a TUI). Inputs/outputs/formatting/pretty-printing. Whereas logs are good for different verbosity levels of debugging. The Python logger lets you add useful context before every log, like a timestamp and a filepath. That extra context messes up the formatting that you intend for your TUI.

Also removes logging imports from files that don't do any logging
and removes the example comment. Both of those changes are just minor
non-functional changes to reduce the number of lines of non-functional code.
The logging module is standard to python and there are plenty of examples
in the official Python docs, so I don't think we gain much by including
examples in each file.
Trying to differentiate between logging and printing. Logging is for informational
and debug text. Printing is like a GUI. Printing is how you interact with the program
on every run. That's how I'm thinking about it in my head right now.
@maupind maupind merged commit 2918843 into maupind:issue_73_add_debug_logging Mar 13, 2024
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

Successfully merging this pull request may close these issues.

2 participants