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

Improve Logging on errors #86

Open
Chocrates opened this issue Jun 7, 2021 · 2 comments
Open

Improve Logging on errors #86

Chocrates opened this issue Jun 7, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Chocrates
Copy link
Contributor

In some places we log exceptions and continue forward, here for example https://github.com/github/github-team-sync/blob/5d50752e9f1b812a9ddfe9f97ee666d3c3f349ac/githubapp/ldap.py#L87

Some of the errors printed currently are not that useful "mail" for instance when the actual exception is a missing attribute on the object,

We should clean this up.

@anonymousr007
Copy link
Contributor

Hi @Chocrates, I'm Rishabh, Can you please elaborate this issue?

@Chocrates
Copy link
Contributor Author

Thanks @anonymousr007, in many places we log the exception directly. The message that the exception throws are things like "mail" or other tersely worded errors.
See https://github.com/github/github-team-sync/blob/a18ca46a12b251c27e0582f769e073e0a0d24fad/githubapp/ldap.py#L87

It looks like this was mostly fixed in the latest code to print stack traces https://github.com/github/github-team-sync/blob/main/app.py#L94

If you'd like you can use this one to focus on rewriting all the logging to use a unified pattern, possibly using logging see https://github.com/github/github-team-sync/blob/main/githubapp/okta.py#L7

I don't have a strong opinion on how logging gets done though, as long as we get stack traces for exceptions :)

cc: @primetheus

@primetheus primetheus self-assigned this Feb 3, 2022
@primetheus primetheus added the enhancement New feature or request label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants