-
Notifications
You must be signed in to change notification settings - Fork 36
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 log message levels and error messages #420
Conversation
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.
LGTM but I lack knowledge about the very internals to ensure nothing else is missing.
... but what I can see looks good, so let's say YASS 🎉
service/git/syncer.go
Outdated
@@ -78,7 +78,7 @@ func (s *Syncer) Sync(ctx context.Context, | |||
} | |||
|
|||
func (s *Syncer) fetch(ctx context.Context, repoInfo *lookout.RepositoryInfo, r *git.Repository, refspecs []config.RefSpec) (err error) { | |||
ctxlog.Get(ctx).Infof("fetching references for repository %s: %v", repoInfo.CloneURL, refspecs) | |||
ctxlog.Get(ctx).Debugf("fetching references for repository %s: %v", repoInfo.CloneURL, refspecs) |
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.
could you please check if we have any info
level message somewhere in the callers that explains downloading?
I remember we make this one as info
because fetching is a slow operation and it looks like lookoutd just hanged without it.
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.
We still have level=info msg="creating local repository for: .....git"
. But reading again I'm realizing now that message is only logged on repo initialization, the next time we fetch a new PR branch you will not see anything.
Fixed in 7359f3a.
Signed-off-by: Carlos Martín <[email protected]>
Signed-off-by: Carlos Martín <[email protected]>
Fix #287.