From c43cd72b2077878c908b264d4aceaadbec7ec773 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 16 Jan 2018 17:01:10 +0100 Subject: [PATCH] dashboard/app: extend some log messages --- dashboard/app/api.go | 6 ++++-- dashboard/app/reporting_email.go | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 93335e88..3d33ee81 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -495,6 +495,8 @@ func reportCrash(c context.Context, ns string, req *dashapi.Crash) (*Bug, error) if _, err = datastore.Put(c, crashKey, crash); err != nil { return nil, fmt.Errorf("failed to put crash: %v", err) } + } else { + log.Infof(c, "not saving crash for %q", bug.Title) } tx := func(c context.Context) error { @@ -553,7 +555,7 @@ func purgeOldCrashes(c context.Context, bug *Bug, bugKey *datastore.Key) { crashes = crashes[:len(crashes)-maxCrashes] var texts []*datastore.Key for _, crash := range crashes { - if crash.ReproSyz != 0 || crash.ReproC != 0 { + if crash.ReproSyz != 0 || crash.ReproC != 0 || !crash.Reported.IsZero() { log.Errorf(c, "purging reproducer?") continue } @@ -574,7 +576,7 @@ func purgeOldCrashes(c context.Context, bug *Bug, bugKey *datastore.Key) { log.Errorf(c, "failed to delete old crashes: %v", err) return } - log.Infof(c, "deleted %v crashes", len(keys)) + log.Infof(c, "deleted %v crashes for bug %q", len(keys), bug.Title) } func apiReportFailedRepro(c context.Context, ns string, r *http.Request) (interface{}, error) { diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index cd45145f..ae2feb6d 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -256,15 +256,15 @@ func incomingMail(c context.Context, r *http.Request) error { // Sometimes it happens that somebody sends us our own text back, ignore it. msg.Command, msg.CommandArgs = "", "" } - bug, bugReporting, reporting := loadBugInfo(c, msg) + bug, _, reporting := loadBugInfo(c, msg) if bug == nil { return nil // error was already logged } - _ = bugReporting emailConfig := reporting.Config.(*EmailConfig) mailingList := email.CanonicalEmail(emailConfig.Email) fromMailingList := email.CanonicalEmail(msg.From) == mailingList mailingListInCC := checkMailingListInCC(c, msg, mailingList) + log.Infof(c, "from/cc mailing list: %v/%v", fromMailingList, mailingListInCC) // A mailing list can send us a duplicate email, to not process/reply // to such duplicate emails, we ignore emails coming from our mailing lists. if msg.Command == "test:" {