-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: logging 0 - add logger configuration and update logging in step 1 #138
Conversation
Co-authored-by: Carlos Paniagua <[email protected]>
Co-authored-by: Camilo Diaz <[email protected]>
Co-authored-by: Carlos Paniagua <[email protected]>
Co-authored-by: Carlos Paniagua <[email protected]>
We can totally do that, but I'd do that in a separate PR – this set is large enough and I want to minimize the merge conflicts. But adding an info at the start and the end of each main function in the analysis directory would be neat. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
# Conflicts: # src/icesat2waves/app.py
# Conflicts: # src/icesat2waves/analysis_db/B01_SL_load_single_file.py # src/icesat2waves/local_modules/m_colormanager_ph3.py # src/icesat2waves/local_modules/m_general_ph3.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contributions to this project, John!
I pointed out some files that are not uniformly formatted and a class that is not named according to PEP8 -- I guess it slipped through the cracks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file does not seem to be uniformly formatted. Also, the color
class is not named according to PEP8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reformatted everything in a follow-on PR #198 – I don't want to deal with the merge conflicts or increase the number of changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The color
class is indeed not named according to PEP8. Not in scope for this PR – I'll open an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Hi all, here's a draft of a possibility to add a logger.
The benefits of redirecting the output to stdout are definitely the speed and ease, but I'm worried that it's a bit hacky and might make life less understandable for future developers.
This way gives us a bit more gradation in the output we want or not – the default also hides all the output, but adding
--debug
or--verbose
directly after theicesat2waves
like this:... will give more output.
Things which are needed to complete this are (for each file in src/):
import logging
_logger = logging.getLogger(__name__)
after the importsprint
andecho
with_logger.debug
everywhereinfo
anddebug
outputs, and just show any warnings.