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

Organize logging levels #3893

Merged
merged 3 commits into from Apr 5, 2018

Conversation

Projects
None yet
4 participants
@humitos
Member

humitos commented Apr 3, 2018

Log only what we need as ERROR when it's something that we need/want to take a look that something could be a bug/issue.

There are some ERROR that were replaced by WARNING since they are some failures but that we don't need to take a look and the message shown to the user should be enough for them.

Check #3898 for style changes

Organize logging levels
Log only what we need as ERROR when it's something that we need/want
to take a look that something could be a bug/issue.

There are some ERROR that were replaced by WARNING since they are some
failures but that we don't need to take a look and the message shown
to the user should be enough for them.

@davidfischer davidfischer self-assigned this Apr 3, 2018

@davidfischer davidfischer self-requested a review Apr 3, 2018

@davidfischer

This comment has been minimized.

Contributor

davidfischer commented Apr 3, 2018

I'll take this one on however the CI issues look real.

@humitos

This comment has been minimized.

Member

humitos commented Apr 4, 2018

@davidfischer I didn't understand your comment and why you assigned this PR to you :P , but I just fixed the linting issues reported by travis.

@@ -58,8 +58,7 @@ def copy(cls, path, target, is_file=False, **__):
mkdir_cmd = ("ssh %s@%s mkdir -p %s" % (sync_user, server, target))
ret = os.system(mkdir_cmd)
if ret != 0:
log.info("COPY ERROR to app servers:")
log.info(mkdir_cmd)
log.error("Copy error to app servers: cmd=%s", mkdir_cmd)

This comment has been minimized.

@stsewd

stsewd Apr 4, 2018

Member

Can we start using single quotes ' around all the strings? 🙏

This comment has been minimized.

@humitos

humitos Apr 4, 2018

Member

We don't do this manually. We are trying to use pre-commit more often that does this automatically.

The result of pre-commit ran under all the modified files by this PR is at: #3898

# Catch unhandled errors when syncing
except RepositoryError as e:
# Do not log as ERROR handled exceptions
log.warning('There was an error with the repository: msg=%s', e.msg)

This comment has been minimized.

@davidfischer

davidfischer Apr 4, 2018

Contributor

We could pass exc_info=True to log.warning if you want the full exception.

This comment has been minimized.

@humitos

humitos Apr 5, 2018

Member

You are right. Changing.

@davidfischer davidfischer removed their assignment Apr 4, 2018

@humitos humitos requested a review from agjohnson Apr 5, 2018

@agjohnson

This looks good to me, but I don't think this is going to reduce our sentry usage enough. I'm leaving #3856 open for now.

@agjohnson agjohnson merged commit 5cb3ba6 into master Apr 5, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@humitos

This comment has been minimized.

Member

humitos commented Apr 6, 2018

In theory after this PR get deployed, we should be seeing only errors that we should take a look and do not ignore in Sentry.

There could be a little more tweak to do maybe, but the general problem should be fixed.

@humitos humitos deleted the humitos/log/sentry branch May 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment