func logEvent(log *logger.Logger, build models.Build, step string, err error) { if err != nil { log.Log("state=error step=build.%s app=%q build=%q error=%q", step, build.App, build.Id, err) } else { log.Success("step=build.%s app=%q build=%q", step, build.App, build.Id) } }
func logError(log *logger.Logger, err *httperr.Error) { if err.User() { log.Log("state=error type=user message=%q", err.Error()) return } err.Save() id := rand.Int31() log.Log("state=error id=%d message=%q", id, err.Error()) for i, line := range err.Trace() { log.Log("state=error id=%d line=%d trace=%q", id, i, line) } }