-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
refactor print statements with the logging module #160
Comments
@MattHJensen, issue #160 from March 2015 seems to be out-of-date. As far as I can see, there are no print statements in the calculate.py file other than the optional:
And, again as far as I can see, there is no "logging module" anywhere in Tax-Calculator. |
@martinholmer, this issue is referencing the optional print statements you have highlighted:
When I committed those print statements in #147, @talumbau suggested refactoring them with Python's built in logging module. I remember that T.J. explained the benefits to me on the phone, but I don't remember them now. @talumbau, could you remind us of the advantages of using the logging module versus print statements in this context? |
Sure. The built-in Python logging module is quite powerful. The documentation is quite extensive and, in my view, the module might suffer a bit from overdesign. But there are two basic ideas that are really great:
And the final nice feature is that if you don't want to care about any of that, you can always replace |
@talumbau, could you please confirm if this code 'refactoring' is still on the project's radar (of course, issue isn't closed). I can help with logging module. Shall I go ahead ? /Ram |
@talumbau and @mramanathan, I honestly don't see a positive net benefit (that is, benefits minus development/maintenance costs) to using the logging module. If it could work inside the functions in the I think there are many other much higher priority things to do than what is described in issue #160. |
Ten days ago @martinholmer said:
I'm assuming that no answer in ten days means the Python logging module would not be able to help with tracing the complex logic in the functions.py file. Also, there has been no objection in ten days to my proposal that issue #160 be closed. |
Here are the relevant lines:
https://github.com/OpenSourcePolicyCenter/Tax-Calculator/blob/master/taxcalc/calculate.py#L93-L99
The text was updated successfully, but these errors were encountered: