diff options
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/models/issue.go b/models/issue.go index 8a6b20727a..753345d38f 100644 --- a/models/issue.go +++ b/models/issue.go @@ -112,7 +112,7 @@ func (issue *Issue) IsTimetrackerEnabled() bool { func (issue *Issue) isTimetrackerEnabled(e Engine) bool { if err := issue.loadRepo(e); err != nil { - log.Error(4, fmt.Sprintf("loadRepo: %v", err)) + log.Error(fmt.Sprintf("loadRepo: %v", err)) return false } return issue.Repo.IsTimetrackerEnabled() @@ -423,23 +423,23 @@ func (issue *Issue) sendLabelUpdatedWebhook(doer *User) { var err error if err = issue.loadRepo(x); err != nil { - log.Error(4, "loadRepo: %v", err) + log.Error("loadRepo: %v", err) return } if err = issue.loadPoster(x); err != nil { - log.Error(4, "loadPoster: %v", err) + log.Error("loadPoster: %v", err) return } mode, _ := AccessLevel(issue.Poster, issue.Repo) if issue.IsPull { if err = issue.loadPullRequest(x); err != nil { - log.Error(4, "loadPullRequest: %v", err) + log.Error("loadPullRequest: %v", err) return } if err = issue.PullRequest.LoadIssue(); err != nil { - log.Error(4, "LoadIssue: %v", err) + log.Error("LoadIssue: %v", err) return } err = PrepareWebhooks(issue.Repo, HookEventPullRequest, &api.PullRequestPayload{ @@ -459,7 +459,7 @@ func (issue *Issue) sendLabelUpdatedWebhook(doer *User) { }) } if err != nil { - log.Error(4, "PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) + log.Error("PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) } else { go HookQueue.Add(issue.RepoID) } @@ -584,7 +584,7 @@ func (issue *Issue) ClearLabels(doer *User) (err error) { if issue.IsPull { err = issue.PullRequest.LoadIssue() if err != nil { - log.Error(4, "LoadIssue: %v", err) + log.Error("LoadIssue: %v", err) return } err = PrepareWebhooks(issue.Repo, HookEventPullRequest, &api.PullRequestPayload{ @@ -604,7 +604,7 @@ func (issue *Issue) ClearLabels(doer *User) (err error) { }) } if err != nil { - log.Error(4, "PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) + log.Error("PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) } else { go HookQueue.Add(issue.RepoID) } @@ -819,7 +819,7 @@ func (issue *Issue) ChangeStatus(doer *User, isClosed bool) (err error) { err = PrepareWebhooks(issue.Repo, HookEventIssues, apiIssue) } if err != nil { - log.Error(4, "PrepareWebhooks [is_pull: %v, is_closed: %v]: %v", issue.IsPull, isClosed, err) + log.Error("PrepareWebhooks [is_pull: %v, is_closed: %v]: %v", issue.IsPull, isClosed, err) } else { go HookQueue.Add(issue.Repo.ID) } @@ -888,7 +888,7 @@ func (issue *Issue) ChangeTitle(doer *User, title string) (err error) { } if err != nil { - log.Error(4, "PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) + log.Error("PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) } else { go HookQueue.Add(issue.RepoID) } @@ -953,7 +953,7 @@ func (issue *Issue) ChangeContent(doer *User, content string) (err error) { }) } if err != nil { - log.Error(4, "PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) + log.Error("PrepareWebhooks [is_pull: %v]: %v", issue.IsPull, err) } else { go HookQueue.Add(issue.RepoID) } @@ -1169,7 +1169,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, assigneeIDs []in Repo: repo, IsPrivate: repo.IsPrivate, }); err != nil { - log.Error(4, "NotifyWatchers: %v", err) + log.Error("NotifyWatchers: %v", err) } mode, _ := AccessLevel(issue.Poster, issue.Repo) @@ -1180,7 +1180,7 @@ func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, assigneeIDs []in Repository: repo.APIFormat(mode), Sender: issue.Poster.APIFormat(), }); err != nil { - log.Error(4, "PrepareWebhooks: %v", err) + log.Error("PrepareWebhooks: %v", err) } else { go HookQueue.Add(issue.RepoID) } |