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

Convert print -> logging #327

Merged
merged 4 commits into from
Apr 7, 2024
Merged

Convert print -> logging #327

merged 4 commits into from
Apr 7, 2024

Conversation

james-otten
Copy link
Collaborator

  • Convert print() to logging.*(), especially logging.exception() for exceptions
  • In one case, limit error message detail to the class name
  • Add a .gitignore entry for myself

@WillNilges
Copy link
Collaborator

Thanks for taking this on. Thoughts on doing some basic logging config?

logger = logging.getLogger(__name__)
logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG)

Also, I un-fixed the bug on the api/v1/mapdata/nodes to test how it logged errors like that, and it seems that it doesn't. I'd really like that for more quickly debugging production errors. Perhaps a setting in logging, django, gunicorn or some combo of the three? 😅

@WillNilges WillNilges enabled auto-merge (squash) April 7, 2024 17:06
@WillNilges WillNilges merged commit d19206b into main Apr 7, 2024
4 checks passed
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